To create a lookup table that maps string names to class references you can use a custom Structure asset and a custom Data Table asset. Here’s how to do that…
Create a new Structure called “ActorClassStruct” (Content Browser > Add New > Blueprints > Structure).
Open the ActorClassStruct for editing.
The structure will have a single default property named “MemberVar_0” of type Boolean. Rename this to “ActorClass” and set its type to “Actor > Class”.
Save and close the structure.
Create a new Data Table called “ActorClassesDataTable” (Content Browser > Add New > Miscellaneous > Data Table). When asked to pick a structure to base your data table on choose the ActorClassStruct you created above.
Open the ActorClassesDataTable for editing.
In the Row Editor panel, click the “+” to add a new row. Then name the row (top right “Row Name” field) to something like “Blueprint1”. This will be the string you use in your code to look up the actual actor class.
Under the “Row Value” section for your row you will see an “ActorClass” property. Open the dropdown next to this property name and select the actual “Blueprint1” class.
Keep adding rows for each of the classes you want to be able to reference.
In the screenshot below I’ve demonstrated one way you can use this data table. This is an actor blueprint I’ve called “Container_BP” and placed in my level. At runtime the Container_BP looks up my Blueprint1 class by the string “Blueprint1”, spawns it, and then attaches it as a child.


