Difference between PostInitProperties and PostEditChangeProperty?

Hello,

As the title says, I’m pretty much just wondering what the difference between the two functions PostInitProperties() and PostEditChangeProperty().

Would be great if someone could clearify :slight_smile: Thanks in advance.

~Stefan

1 Like

PostEditChangeProperty only gets called when the property is modified “externally.” It is useful for when a property is changed in the editor or by another object. PostInitProperties is called after the constructor but before BeginPlay whether you are playing in the editor or in a packaged game. You use this to do initialization that is reliant on your properties being fully initialized but it is only called once at the beginning of the object’s initialization.

Ah okay, I finally understand :slight_smile: Thanks for clearing this up!

Do you by any chance know in the case of the UObject class how to know when ‘PostInitProperties’ is called after instantiating the object in-game?

The function is called multiple times when the editor opens up but only once when creating the object in-game.

I have functionality that I want to run after the blueprint properties have loaded but I don’t want to create a custom constructor to call every time after creating the object.

1 Like