Compare commits

...

3 Commits

Author SHA1 Message Date
paring c1d73de3b5
fix: toggle names & field name 2022-11-06 00:26:57 +09:00
paring 5693203e77
fix: disable focused checkbox 2022-11-06 00:26:29 +09:00
paring 563e1ec348
fix: root namespace 2022-11-06 00:26:02 +09:00
3 changed files with 8 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"name": "SkyHook.Unity.Editor",
"rootNamespace": "SkyHook.Editor",
"rootNamespace": "SkyHook",
"references": [
"GUID:5277a9c527b33a210bfa8bb54a667bf4"
],

View File

@ -13,13 +13,13 @@ namespace SkyHook.Editor
SkyHookManager manager = (SkyHookManager)target;
GUI.enabled = false;
EditorGUILayout.Toggle("Hook Started", manager.isHookActive);
EditorGUILayout.Toggle("Hook is running", manager.isHookActive);
GUI.enabled = true;
manager.requireFocus = EditorGUILayout.Toggle("Require Focus", manager.requireFocus);
manager.requireFocus = EditorGUILayout.Toggle("Focus required", manager.requireFocus);
GUI.enabled = manager.requireFocus;
SkyHookManager.isFocused = EditorGUILayout.Toggle("Focus", SkyHookManager.isFocused);
GUI.enabled = false;
EditorGUILayout.Toggle("Focused", SkyHookManager.IsFocused);
GUI.enabled = true;
}

View File

@ -10,7 +10,7 @@ namespace SkyHook
{
private static SkyHookManager _instance;
public static bool isFocused;
public static bool IsFocused;
/// <summary>
/// Whether or not the event will be received only if the game window is focused.
@ -49,7 +49,7 @@ namespace SkyHook
private void HookCallback(SkyHookEvent ev)
{
if (requireFocus && !isFocused)
if (requireFocus && !IsFocused)
{
return;
}
@ -124,9 +124,7 @@ namespace SkyHook
{
if (requireFocus)
{
#if !UNITY_EDITOR
isFocused = Application.isFocused;
#endif
IsFocused = Application.isFocused;
}
}
}