feat: start/stop hook button
parent
3320a4611e
commit
36bc0f8b0e
|
@ -22,6 +22,13 @@ namespace SkyHook.Editor
|
||||||
EditorGUILayout.Toggle("Focused", SkyHookManager.IsFocused);
|
EditorGUILayout.Toggle("Focused", SkyHookManager.IsFocused);
|
||||||
GUI.enabled = true;
|
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