Store Class Type in Blueprint variable ?

I need to store multiple different Blueprint-Actor-Classes in an Array, and spawn an instance of them on demand. Is that possible ? What type of array do I need ?

The purple class variable stores classes. But anytime I plug such a variable into a Spawn Actor node for the class it bugs out on me, so I don’t know how it is supposed to work.

Anyway you can do it manually on the spawn actor node without the class if you run into problems with the variable as I have. Try the variable first though.

The answer is: You can just use class’Object’ as type and put in any class you want. It will still spawn an object of the correct class.

Maybe a little late but still :

1/ Left click your array’s icon in My Blueprint / Variables Tab

2/ Type “actor”

3/ In suggestions, point “Actor” with mouse.

4/ Choose the “Class” line in the drop-down menu that appears on the right. (purple icon)

To spawn an element : AddChildActorComponent node → plug a SetChildActorClass node from ReturnValue Pin, and whatever element of your array you want in the “InClass” pin of this same last node.