Compare commits
2 Commits
9d4ae6aa58
...
36bc0f8b0e
Author | SHA1 | Date |
---|---|---|
ChocoSwi | 36bc0f8b0e | |
ChocoSwi | 3320a4611e |
|
@ -10,7 +10,7 @@ namespace SkyHook.Editor
|
|||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
SkyHookManager manager = (SkyHookManager)target;
|
||||
SkyHookManager manager = SkyHookManager.Instance;
|
||||
|
||||
GUI.enabled = false;
|
||||
EditorGUILayout.Toggle("Hook is running", manager.isHookActive);
|
||||
|
@ -22,6 +22,13 @@ namespace SkyHook.Editor
|
|||
EditorGUILayout.Toggle("Focused", SkyHookManager.IsFocused);
|
||||
GUI.enabled = true;
|
||||
|
||||
GUI.enabled = EditorApplication.isPlaying;
|
||||
if (GUILayout.Button(manager.isHookActive ? "Stop Hook" : "Start Hook"))
|
||||
{
|
||||
if(manager.isHookActive) SkyHookManager.StopHook();
|
||||
else SkyHookManager.StartHook();
|
||||
}
|
||||
GUI.enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue