I am using an unmodified version of the Player Input.
I have setup a simple Input Action Asset and I’ve added it to the Player Input
By using the ‘Send Messages’ behaviour, I call some Debug.Logs to test some functions.
I have an official Xbox Controller plugged into my PC with a usb cable.
When I play the game in the editor and pull the cable out of the controller, I get a callback fromOnDeviceLost.
Let’s get into the problem.
From that point, the entire Input System is not happy. With every action from any device, Keyboard or Mouse, it gives 2 error messages.
I’ve tried to set the PlayerSetting to only use the new Input System but also to use both. Still the same error messages.
Is there anything I can do? Do I have to revert my input package? Or do I have to make a completely new PlayerInput-like script myself?
First error mesage
IndexOutOfRangeException during event processing of Dynamic update; resetting event buffer
UnityEngine.InputSystem.LowLevel.NativeInputRuntime/<>c__DisplayClass7_0:<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType,UnityEngineInternal.Input.NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType,intptr)
Second error mesage
IndexOutOfRangeException: Index was outside the bounds of the array.
(wrapper stelemref) System.Object.virt_stelemref_class_small_idepth(intptr,object)
UnityEngine.InputSystem.Utilities.ArrayHelpers.EraseSliceWithCapacity[TValue] (TValue[]& array, System.Int32& length, System.Int32 index, System.Int32 count) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Utilities/ArrayHelpers.cs:740)
UnityEngine.InputSystem.Users.InputUser.UpdateControlSchemeMatch (System.Int32 userIndex, System.Boolean autoPairMissing) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Plugins/Users/InputUser.cs:1358)
UnityEngine.InputSystem.Users.InputUser.UnpairDevices () (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Plugins/Users/InputUser.cs:637)
UnityEngine.InputSystem.PlayerInput.OnUnpairedDeviceUsed (UnityEngine.InputSystem.InputControl control, UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Plugins/PlayerInput/PlayerInput.cs:1817)
UnityEngine.InputSystem.Users.InputUser.OnEvent (UnityEngine.InputSystem.LowLevel.InputEventPtr eventPtr, UnityEngine.InputSystem.InputDevice device) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/Plugins/Users/InputUser.cs:1733)
UnityEngine.InputSystem.InputManager.OnUpdate (UnityEngine.InputSystem.LowLevel.InputUpdateType updateType, UnityEngine.InputSystem.LowLevel.InputEventBuffer& eventBuffer) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/InputManager.cs:2638)
UnityEngine.InputSystem.LowLevel.NativeInputRuntime+<>c__DisplayClass7_0.<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType updateType, UnityEngineInternal.Input.NativeInputEventBuffer* eventBufferPtr) (at Library/PackageCache/com.unity.inputsystem@1.0.2/InputSystem/NativeInputRuntime.cs:64)
UnityEngine.InputSystem.LowLevel.<>c__DisplayClass7_0:<set_onUpdate>b__0(NativeInputUpdateType, NativeInputEventBuffer*)
UnityEngineInternal.Input.NativeInputSystem:NotifyUpdate(NativeInputUpdateType, IntPtr)