- Home /
Is there a Function Callback for when a vairable is altered in the Inspector?
I am writing a custom editor where GameObjects in the scene view are connected with lines using Handle.DrawLine. To "Connect" the GameObjects each contains a script which holds a List which can be filled using inspector by dragging other GameObjects from the hierarchy.
Is there a function that the Editor can inherit or a delegate that detects when this drop action into the List happens ie when a variable is changed from the inspector?
Thanks!
Comment
Answer by Jeffom · Jan 31, 2013 at 02:06 PM
I don't know of one, but on the OnGUI update from the inspector you can always check if list has changed (by checking its size for example) and then call your callback for the update.