Пример #1
0
        private void OnEnable()
        {
            Undo.undoRedoPerformed += PrecessUndo;

            EditorActions.Clear();
            EditorState.Clear();
            EditorState.Repaint = Repaint;

            States = (States)target;

            SerializedState = serializedObject;

            EditorGroup.Enable(States.Group);
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            SerializedState.Update();

            GUILayout.BeginHorizontal();
            GUILayout.Space(-8);

            GUILayout.BeginVertical();
            GUILayout.Space(2);

            EditorGroup.Draw(States.Group);

            GUILayout.EndVertical();
            GUILayout.EndHorizontal();

            EditorActions.Process();

            SerializedState.ApplyModifiedProperties();
        }
Пример #3
0
 private void PrecessUndo()
 {
     EditorGroup.Enable(States.Group);
     EditorState.Reorder(States.Group);
     Repaint();
 }