Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit dbd3bcb

Browse files
Patch to resolve issues without the new Input System installed
1 parent c591106 commit dbd3bcb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Runtime/Scripts/Utilities/UIExtensionsInputManager.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
using System;
55
using System.Collections.Generic;
6+
7+
#if !ENABLE_LEGACY_INPUT_MANAGER
68
using UnityEngine.InputSystem;
79
using UnityEngine.InputSystem.Controls;
10+
#endif
811

912
namespace UnityEngine.UI.Extensions
1013
{
@@ -87,6 +90,7 @@ public static bool GetButton(string input)
8790
#endif
8891
}
8992

93+
#if !ENABLE_LEGACY_INPUT_MANAGER
9094
private static ButtonControl GetButtonControlFromString(string input)
9195
{
9296
if (Gamepad.current == null)
@@ -104,6 +108,7 @@ private static ButtonControl GetButtonControlFromString(string input)
104108
return null;
105109
}
106110
}
111+
#endif
107112

108113
public static bool GetButtonDown(string input)
109114
{
@@ -164,6 +169,7 @@ public static bool GetKey(KeyCode key)
164169
#endif
165170
}
166171

172+
#if !ENABLE_LEGACY_INPUT_MANAGER
167173
private static KeyControl GetKeyControlFromKeyCode(KeyCode key)
168174
{
169175
if (Keyboard.current == null)
@@ -193,6 +199,7 @@ private static KeyControl GetKeyControlFromKeyCode(KeyCode key)
193199
return null;
194200
}
195201
}
202+
#endif
196203

197204
public static bool GetKeyDown(KeyCode key)
198205
{

0 commit comments

Comments
 (0)