// This is Unity's. Block from sub-classes - Use header, update and footer callbacks callbacks public override void OnInspectorGUI() { // Used like a header to set a global label width EditorGUI.indentLevel = 0; PGEditorUtils.SetLabelWidth(); this.serializedObject.Update(); this.OnInspectorGUIHeader(); this.OnInspectorGUIUpdate(); EditorGUILayout.Space(); this.OnInspectorGUIFooter(); // Flag Unity to save the changes to to the prefab to disk serializedObject.ApplyModifiedProperties(); if (GUI.changed) { EditorUtility.SetDirty(target); } }