This repository has been archived on 2023-05-28. You can view files and clone it, but cannot push or open issues/pull-requests.
SkyHook-Unity/Editor/SkyHookEditor.cs

28 lines
781 B
C#
Raw Normal View History

2022-11-05 23:24:33 +09:00
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace SkyHook.Editor
{
[CustomEditor(typeof(SkyHookManager))]
public class SkyHookEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
SkyHookManager manager = (SkyHookManager)target;
2022-11-05 23:29:49 +09:00
2022-11-05 23:25:09 +09:00
GUI.enabled = false;
2022-11-06 00:26:57 +09:00
EditorGUILayout.Toggle("Hook is running", manager.isHookActive);
2022-11-05 23:25:09 +09:00
GUI.enabled = true;
2022-11-05 23:29:49 +09:00
2022-11-06 00:26:57 +09:00
manager.requireFocus = EditorGUILayout.Toggle("Focus required", manager.requireFocus);
2022-11-05 23:38:03 +09:00
2022-11-06 00:26:29 +09:00
GUI.enabled = false;
2022-11-06 00:26:57 +09:00
EditorGUILayout.Toggle("Focused", SkyHookManager.IsFocused);
2022-11-05 23:38:03 +09:00
GUI.enabled = true;
2022-11-05 23:24:33 +09:00
}
}
}