How to make sure init script runs before SpawnActor returns?

In the blueprint setup below, “Do something with TestActor” is printed before “Init TestActor” showing that the BeginPlay for TestActor is not fired immediately after SpawnActor Test Actor is called.

How can I make sure that some init bp script I have runs before SpawnActor returns?

I don’t want to be limited in what I can do in the init script, so using Construction Script is not an option. (See here and here)

Read this

I’d go with PreInitializeComponents In your actor, this should fire, before actor is physically created in the world. Cheers.

Thanks for the response! That is indeed a good read containing some very useful info. Though I was wondering if there was a blueprint option for that? (It seems like a fairly common task…)

Isn’t there PostInitComponents in blueprints?

I’m afraid I can’t find where that node is…? I only found C++ related stuff when googling PostInitComponents

Is it like Event PostInitComponents?

yes, exactly :slight_smile:

I still can’t find it… would you be so kind as to post a screenshot of it… thanks!