Callback or event when an actor moves, or when a property changes

Hi,

In my game, I need to update an internal representation of certain properties of the Unreal Actor, such as their position, bounds, and some custom properties - when they change.

I have seen threads on using onObjectPropertyChanged etc - but all of those seem to only work when played through the editor.

So to be clear: I am not talking about a callback when, in the editor, a game-dev changes a property - I am talking about a callback that fires if a transform on an actor is changed at runtime, for whatever reason, or a property defined via UPROPERTY.

Is there such a system in Unreal?

Or is the only solution to poll on the transform and properties in the actor’s tick function and compare the current value with the one in the internal representation?

thanks
Marcus

1 Like

TransformUpdated on the actor’s root component will give you a delegate for when the actor is moved
For the properties, I would say just use setters instead of just setting the field

1 Like

Thanks Zeaf - I will look into that!

cheers
Marcus

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.