Acotr in Editor - what events are fired.

Hi,

m trying to have an actor that must update its internal data once its components are loaded. So I set the data update in PostInitializeComponents function.

In editor, when I place the actor, the PostInitializeComponents/BeginPlay is never called whereas it is called properly in game.

What events should I use to update the date inside the Editor?

FYI, I’m using a FDebugRenderSceneProxy to draw my actor just in case it helps.

Thanks,

As you’ve found, PostInitializeComponents/BeginPlay are specifically about initializing for gameplay purposes, not for in the editor.

There’s a couple of different options depending on your needs:

PostInitProperties is called after all the components are created and initialized to their default values. Keep in mind that this is called for both created and loaded Objects, and in the case where an object is being loaded from disk (an Actor placed in the level) it will not yet have any saved values.

PostLoad can be used to do work based on the values loaded from disk and PostActorCreated is the equivalent function of PostLoad for Actors spawned dynamically.

PostRegisterAllComponents may also be a useful function, but do keep in mind that this function will be called anytime RegisterAllComponents is called which can happen for a number of different reasons, not just initial set up.

Thanks Marc, I think I will go to the PostLoad & PostActorCreated path. Those seems to fit my needs.