public override void OnInspectorGUI() { // Draw the default base.OnInspectorGUI(); // Place the button at the bottom BaseObjectCollection collection = (BaseObjectCollection)target; if (GUILayout.Button("Update Collection")) { collection.UpdateCollection(); } }
sealed public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(ignoreInactiveTransforms); EditorGUILayout.PropertyField(sortType); OnInspectorGUIInsertion(); serializedObject.ApplyModifiedProperties(); // Place the button at the bottom BaseObjectCollection collection = (BaseObjectCollection)target; if (GUILayout.Button("Update Collection")) { collection.UpdateCollection(); } }