public virtual void OnSceneGUI() { if (canEditor == false) { return; } if (headStyle == null) { headStyle = new HeadStyles(); rectSolideColor.a = 0.2f; } GUI.changed = false; drawSceneGUI(); if (GUI.changed) { EditorUtility.SetDirty(this.target); } }
public override void OnInspectorGUI() { if (canEditor == false) { return; } if (mTarget == null) { return; } if (headStyle == null) { headStyle = new HeadStyles(); rectSolideColor.a = 0.2f; } EditorGUI.BeginChangeCheck(); drawInspectorGUI(); if (EditorGUI.EndChangeCheck()) { EditorUtility.SetDirty(this.target); serializedObject.ApplyModifiedProperties(); } }