public override void OnInspectorGUI() { EditorGUI.BeginChangeCheck(); Target = (T)target; Targets = targets.Select(t => (T)t).ToArray(); P3dHelper.ClearColors(); Separator(); OnInspector(); Separator(); serializedObject.ApplyModifiedProperties(); if (EditorGUI.EndChangeCheck() == true) { GUI.changed = true; Repaint(); foreach (var t in Targets) { EditorUtility.SetDirty(t); } } }
protected virtual void OnGUI() { P3dHelper.ClearColors(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); { EditorGUI.BeginChangeCheck(); { OnInspector(); } if (EditorGUI.EndChangeCheck() == true) { SceneView.RepaintAll(); } } GUILayout.EndScrollView(); }