示例#1
0
        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);
            }
        }
示例#2
0
        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();
            }
        }