diff --git a/Assets/Scripts/InputSystem/PlayerInput.cs b/Assets/Scripts/InputSystem/PlayerInput.cs index 9840b42d5..6e29de66d 100644 --- a/Assets/Scripts/InputSystem/PlayerInput.cs +++ b/Assets/Scripts/InputSystem/PlayerInput.cs @@ -121,17 +121,6 @@ namespace HeavenStudio public static InputController GetInputController(int player) { - // Needed so Keyboard works on MacOS and Linux -#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX - inputDevices = new List(); - if(inputDevices.Count < 1) - { - InputKeyboard keyboard = new InputKeyboard(); - keyboard.SetPlayer(1); - keyboard.InitializeController(); - inputDevices.Add(keyboard); - } -#endif //select input controller that has player field set to player //this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons) //so such controllers should have a reference to the other controller in the pair @@ -151,19 +140,6 @@ namespace HeavenStudio //this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons) //so such controllers should have a reference to the other controller in the pair //controller IDs are determined by connection order (the Keyboard is always first) - - - // Needed so Keyboard works on MacOS and Linux -#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX - inputDevices = new List(); - if(inputDevices.Count < 1) - { - InputKeyboard keyboard = new InputKeyboard(); - keyboard.SetPlayer(1); - keyboard.InitializeController(); - inputDevices.Add(keyboard); - } -#endif for (int i = 0; i < inputDevices.Count; i++) { if (inputDevices[i].GetPlayer() == player) @@ -176,17 +152,6 @@ namespace HeavenStudio public static void UpdateInputControllers() { - // Needed so Keyboard works on MacOS and Linux -#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX - inputDevices = new List(); - if(inputDevices.Count < 1) - { - InputKeyboard keyboard = new InputKeyboard(); - keyboard.SetPlayer(1); - keyboard.InitializeController(); - inputDevices.Add(keyboard); - } -#endif foreach (InputController i in inputDevices) { i.UpdateState();