Check if any control was changed inside a block of code.
EditorGUI.BeginChangeCheck (); // Block of code with controls // that may set GUI.changed to true. if (EditorGUI.EndChangeCheck ()) { // Code to execute if GUI.changed // was set to true inside the block of code above. }