Add detective board
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using Unheimlich.Data.DetectiveBoard;
|
||||
|
||||
namespace Unheimlich.Editor
|
||||
{
|
||||
[CustomEditor(typeof(ClueData))]
|
||||
public class ClueDataEditor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector();
|
||||
|
||||
ClueData clueData = (ClueData)target;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("Quick Actions", EditorStyles.boldLabel);
|
||||
|
||||
if (GUILayout.Button("Generate Unique ID"))
|
||||
{
|
||||
clueData.ClueID = System.Guid.NewGuid().ToString();
|
||||
EditorUtility.SetDirty(clueData);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Test Unlock Clue (Play Mode Only)"))
|
||||
{
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
Managers.DetectiveBoardManager.Instance?.UnlockClue(clueData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("This button only works in Play Mode!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user