示例#1
0
        public EditorState(Data.State state)
        {
            _foldout = new AnimBool(false);
            _state   = state;

            Editors.Add(state.Id, this);

            if (Repaint != null)
            {
                _foldout.valueChanged.AddListener(Repaint);
            }

            Enable();
        }
示例#2
0
 public static EditorState Get(Data.State state) => Editors.ContainsKey(state.Id) ? Editors[state.Id] : new EditorState(state);
示例#3
0
 public static void Draw(Rect rect, Data.State state) => Draw(rect, Get(state));