feat: start/stop hook button

develop
ChocoSwi 2022-11-06 01:08:23 +09:00
parent 3320a4611e
commit 36bc0f8b0e
1 changed files with 7 additions and 0 deletions

View File

@ -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;
}
}
}