Create an instance of an actor without spawning it.

In my project I want to get a reference to a class and spawn & despawn it whenever I want.
For example create actor, wait, spawn it in x,y,z, wait again, despawn it, etc…

But I don’t find a way to create an instance of a class without spawning it in. Is there a way to create an instance of a class without spawning it in?

Or at least, is it possible to save somehow the class itself, so I can spawn something from a class without knowing beforehand what the class is (for example is I have object A from class C, but during programming I don’t know what class C is, so is there a way to save class C so I can spawn more object from class C)

You could get a class from the desired actor and save it in a variable:

Then spawn an actor from the var:

My Products

1 Like

Hi Yuval63,

You can create pools of actors and use/unuse those doing your game/project.

These get created by their Class Name, so you can reference those class in the same way as spawn - maybe an Array of your classes which you could then choose from.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.