Patch to resolve issues without the new Input System installed
parent
c59110665d
commit
dbd3bcbaa7
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
#if !ENABLE_LEGACY_INPUT_MANAGER
|
||||||
using UnityEngine.InputSystem;
|
using UnityEngine.InputSystem;
|
||||||
using UnityEngine.InputSystem.Controls;
|
using UnityEngine.InputSystem.Controls;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace UnityEngine.UI.Extensions
|
namespace UnityEngine.UI.Extensions
|
||||||
{
|
{
|
||||||
|
@ -87,6 +90,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !ENABLE_LEGACY_INPUT_MANAGER
|
||||||
private static ButtonControl GetButtonControlFromString(string input)
|
private static ButtonControl GetButtonControlFromString(string input)
|
||||||
{
|
{
|
||||||
if (Gamepad.current == null)
|
if (Gamepad.current == null)
|
||||||
|
@ -104,6 +108,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
public static bool GetButtonDown(string input)
|
public static bool GetButtonDown(string input)
|
||||||
{
|
{
|
||||||
|
@ -164,6 +169,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !ENABLE_LEGACY_INPUT_MANAGER
|
||||||
private static KeyControl GetKeyControlFromKeyCode(KeyCode key)
|
private static KeyControl GetKeyControlFromKeyCode(KeyCode key)
|
||||||
{
|
{
|
||||||
if (Keyboard.current == null)
|
if (Keyboard.current == null)
|
||||||
|
@ -193,6 +199,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
public static bool GetKeyDown(KeyCode key)
|
public static bool GetKeyDown(KeyCode key)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue