public EditorState(Data.State state) { _foldout = new AnimBool(false); _state = state; Editors.Add(state.Id, this); if (Repaint != null) { _foldout.valueChanged.AddListener(Repaint); } Enable(); }
public static EditorState Get(Data.State state) => Editors.ContainsKey(state.Id) ? Editors[state.Id] : new EditorState(state);
public static void Draw(Rect rect, Data.State state) => Draw(rect, Get(state));