Spawn actor deferred

Hi!

Is it possible to spawn an actor deferred in Blueprints?

In C++ I do this:

AActor* SpawnedActor = GetWorld()->SpawnActorDeferred<AActor>(SpawnedActor, SpawnTransform);

Then, do something. And after that:

SpawnedActor ->FinishSpawning(SpawnTransform);

Thank you.

I think this is not possible in Blueprint.

Someone has suggested me to use a variable with Expose on Spawn enabled.

ive not tried but no reason you can just expose it to blueprints yourself?

what are you trying to achieve?

Hey there @ViaCognita! From what I could tell that specific function isn’t exposed to BP, but you could expose it or make a custom node with it like Auran mentioned. Maybe just a little wrapper to make it a quick job.

Some resources on exposing C++ functions to BP:

2 Likes

you may need a custom K2Node though so it can detect the ExposeOnSpawn variables, otherwise you need a different wrapper function for every class

1 Like