This repository was archived by the owner on Mar 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Runtime/Scripts/Utilities Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 33
44using System ;
55using System . Collections . Generic ;
6+
7+ #if ! ENABLE_LEGACY_INPUT_MANAGER
68using UnityEngine . InputSystem ;
79using UnityEngine . InputSystem . Controls ;
10+ #endif
811
912namespace 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 {
You can’t perform that action at this time.
0 commit comments