26 lines
662 B
C#
26 lines
662 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
[CustomEditor(typeof(MapTargetController))]
|
|
public sealed class MapTargetControllerEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
DrawDefaultInspector();
|
|
EditorGUILayout.Space();
|
|
|
|
using (new EditorGUI.DisabledScope(!Application.isPlaying))
|
|
{
|
|
if (GUILayout.Button("Start Next Wave"))
|
|
((MapTargetController)target).StartNextWave();
|
|
}
|
|
|
|
if (!Application.isPlaying)
|
|
{
|
|
EditorGUILayout.HelpBox(
|
|
"Start Next Wave becomes available in Play Mode.",
|
|
MessageType.Info);
|
|
}
|
|
}
|
|
}
|