Good way to update an editor script if an object is moved in the scene.

Hi there!

Just trying to figure out a good way to update a script if a particular object is moved in the scene.
I am trying to write this script for an Artist working on the scene rather than during Play.
At the moment I have [ExecuteAlways] with an update loop to keep checking.
It’s surrounded by code to make sure it never gets to the build as well as if (Application.isPlaying) return; and it works fine but I feel there might be a better way so I though I’d just ask here.

Any ideas?
Thanks!
Pete

Is this maybe what you’re looking for?

Hey thanks @Kurt-Dekker , but I wanted to trigger a script when the artist transforms an object. So any time they Scale Rotate or Translate.
That is super handy though!

Bump?

If you only want this for a particular object, then you would make an UnityEditor.Editor class for a component on it and use anything from the Handles class in OnSceneGUI.