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?


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.