private void DrawFunctionArea() { EditorGUILayout.LabelField("Function", EditorStyles.boldLabel); saveSection = EditorGUILayout.TextField("Save section", saveSection); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("Save")) { SaveableEditor.Save(this.GetType().Name, saveSection, this.saveEditor); } if (GUILayout.Button("Load")) { this.saveEditor = SaveableEditor.Load(this.GetType().Name, saveSection, this.saveEditor); } if (GUILayout.Button("Remove")) { SaveableEditor.Remove(this.GetType().Name, saveSection); } if (GUILayout.Button("Remove All")) { SaveableEditor.Remove(this.GetType().Name); } EditorGUILayout.EndHorizontal(); }
private void OnEnable() { saveEditor = SaveableEditor.Load(this.GetType().Name, saveSection, saveEditor); }