I have a boolean UPROPERTY that is exposed on the actor’s detail panel. When I change this in the editor the actor’s OnConstruction function is invoked and the actor is reconstructed in the level taking that boolean into account.
I also added a PostEditChangeProperty to watch for changes in the property, hoping that I could use this to watch for changes to the property in-game (triggered via blueprints) but it turns out that PostEditChangeProperty is only called when you change details from within the Editor.
So two questions in all:
How do I listen to property changes in-game, is there something like PostEditChangeProperty or a property setter accessor syntax that I’m missing? I realize I can just create a UFUNCTION and invoke that from blueprints instead (that’s what I’m doing now) so this is more of a design what-if question.
What’s the point of using PostEditChangeProperty if the OnConstruction function gets reinvoked for all property changes in the details panel anyhow? Assuming the OnConstruction script constructs the object taking all UPROPERTY-ies into account won’t the effect of reacting to those property changes in PostEditChangeProperty be the same?