Beispiel #1
0
 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();
 }
Beispiel #2
0
 private void OnEnable()
 {
     saveEditor = SaveableEditor.Load(this.GetType().Name, saveSection, saveEditor);
 }