gather-and-defend/Assets/Editor/LevelManagerEditor.cs
Felix Boucher 27d72368aa finish integrating level selector
Level selector was already working after work by William but some small bugs remained to be fixed + it wasn't possible to return to level selector once we were in the level.

- it's now possible to go back to level selector from Level
- LevelManagerScript is no longer a singleton (this way, it resets with the Game scene unloading)
- Added a property drawer for using scene files in inspectors
2023-07-23 20:16:44 -04:00

22 lines
510 B
C#

using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(LevelManagerScript))]
public class LevelManagerEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
if (Application.isPlaying)
{
if (GUILayout.Button("Save"))
{
LevelManager.Instance.SaveFile();
}
if (GUILayout.Button("Load"))
{
LevelManager.Instance.LoadFile();
}
}
}
}