Daily Unreal Column #70 - PostEditChangeChainProperty
It is often a case that you want to run some custom code whenever you update a property on your object or actor. For example to do some validation or update another property based on it?
All you need to do is to overwrite a single function:
virtual void PostEditChangeChainProperty(struct FPropertyChangedChainEvent & PropertyChangedEvent) override;
The base function is defined inside UObject
class, so any subclass can overwrite it. Inside it, you figure out which property has been updated based on the data from the FPropertyChangedChainEvent
, but more details how to fetch this data will be covered in the future column.