PostInitProperties() :: how to call a BlueprintNativeEvent?
I try to invoke a BlueprintNativeEvent in my object's PostInitProperties(), but a strange behaviour occurs.
The above C++ class has a BP child, with this override:
As you may have noticed, no matter the default C++ _Implementation or the override, both return true and print some string to indicate they run, but on practice no string is printed and false is returned from initAsStatic() at line4. i assume that false is returned because it is the default return value of empty bool functions.
The function works well if triggered from BeginPlay or during regular runtime though. why is it not working in PostInitProperties()?
Because at this stage object and even more actor and it's blueprint scripting is not fully initiated, not to mention it's called in editor when you place actor in editor. Blueprint is meant to run only in game play, so earliest event you can use is BeginPlay, optionally OnConstruction which should behave the same as construction script. Outside of those events things may work strange if at all
Follow this question
Once you sign in you will be able to subscribe for any updates here