mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-17 08:37:49 +08:00
Made instance inspector helper (owner gameobject/name), force loading unhollowed Assembly-CSharp on game start
This commit is contained in:
@ -12,8 +12,17 @@ namespace UnityExplorer.Input
|
||||
{
|
||||
private static IHandleInput m_inputModule;
|
||||
|
||||
public static Vector3 MousePosition => m_inputModule.MousePosition;
|
||||
|
||||
public static bool GetKeyDown(KeyCode key) => m_inputModule.GetKeyDown(key);
|
||||
public static bool GetKey(KeyCode key) => m_inputModule.GetKey(key);
|
||||
|
||||
public static bool GetMouseButtonDown(int btn) => m_inputModule.GetMouseButtonDown(btn);
|
||||
public static bool GetMouseButton(int btn) => m_inputModule.GetMouseButton(btn);
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
#if CPP
|
||||
if (InputSystem.TKeyboard != null || (ReflectionHelpers.LoadModule("Unity.InputSystem") && InputSystem.TKeyboard != null))
|
||||
{
|
||||
m_inputModule = new InputSystem();
|
||||
@ -22,6 +31,7 @@ namespace UnityExplorer.Input
|
||||
{
|
||||
m_inputModule = new LegacyInput();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_inputModule == null)
|
||||
{
|
||||
@ -29,13 +39,5 @@ namespace UnityExplorer.Input
|
||||
m_inputModule = new NoInput();
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector3 MousePosition => m_inputModule.MousePosition;
|
||||
|
||||
public static bool GetKeyDown(KeyCode key) => m_inputModule.GetKeyDown(key);
|
||||
public static bool GetKey(KeyCode key) => m_inputModule.GetKey(key);
|
||||
|
||||
public static bool GetMouseButtonDown(int btn) => m_inputModule.GetMouseButtonDown(btn);
|
||||
public static bool GetMouseButton(int btn) => m_inputModule.GetMouseButton(btn);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user