From dbd3bcbaa7eb7cd5e6043d38681e526702d8df00 Mon Sep 17 00:00:00 2001 From: "Simon (darkside) Jackson" Date: Wed, 14 Oct 2020 16:21:26 +0100 Subject: [PATCH] Patch to resolve issues without the new Input System installed --- Runtime/Scripts/Utilities/UIExtensionsInputManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Runtime/Scripts/Utilities/UIExtensionsInputManager.cs b/Runtime/Scripts/Utilities/UIExtensionsInputManager.cs index 85453f4..2445aff 100644 --- a/Runtime/Scripts/Utilities/UIExtensionsInputManager.cs +++ b/Runtime/Scripts/Utilities/UIExtensionsInputManager.cs @@ -3,8 +3,11 @@ using System; using System.Collections.Generic; + +#if !ENABLE_LEGACY_INPUT_MANAGER using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; +#endif namespace UnityEngine.UI.Extensions { @@ -87,6 +90,7 @@ namespace UnityEngine.UI.Extensions #endif } +#if !ENABLE_LEGACY_INPUT_MANAGER private static ButtonControl GetButtonControlFromString(string input) { if (Gamepad.current == null) @@ -104,6 +108,7 @@ namespace UnityEngine.UI.Extensions return null; } } +#endif public static bool GetButtonDown(string input) { @@ -164,6 +169,7 @@ namespace UnityEngine.UI.Extensions #endif } +#if !ENABLE_LEGACY_INPUT_MANAGER private static KeyControl GetKeyControlFromKeyCode(KeyCode key) { if (Keyboard.current == null) @@ -193,6 +199,7 @@ namespace UnityEngine.UI.Extensions return null; } } +#endif public static bool GetKeyDown(KeyCode key) {