Search Unity

Unknown (infuriating :P) Errors in 0.0.7 [Latest]

Discussion in 'Input System' started by Wahooney, Sep 19, 2018.

  1. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    I'm getting these errors whenever I use one of the actions I've defined in an InputActions object. As far as I can tell, I'm enabling the correct action maps, and the correct actions, but I keep getting this.

    IndexOutOfRangeException: Index was outside the bounds of the array.
    UnityEngine.Experimental.Input.InputActionMapState.ChangePhaseOfAction (UnityEngine.Experimental.Input.InputActionPhase newPhase, UnityEngine.Experimental.Input.InputActionMapState+TriggerState& trigger, UnityEngine.Experimental.Input.InputActionPhase phaseAfterPerformedOrCancelled) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:786)
    UnityEngine.Experimental.Input.InputActionMapState.ProcessControlStateChange (System.Int32 mapIndex, System.Int32 controlIndex, System.Int32 bindingIndex, System.Double time, UnityEngine.Experimental.Input.LowLevel.InputEventPtr eventPtr) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:511)
    UnityEngine.Experimental.Input.InputActionMapState.UnityEngine.Experimental.Input.LowLevel.IInputStateChangeMonitor.NotifyControlStateChanged (UnityEngine.Experimental.Input.InputControl control, System.Double time, UnityEngine.Experimental.Input.LowLevel.InputEventPtr eventPtr, System.Int64 mapControlAndBindingIndex) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:397)
    UnityEngine.Experimental.Input.InputManager.FireStateChangeNotifications (System.Int32 deviceIndex, System.Double internalTime, UnityEngine.Experimental.Input.LowLevel.InputEvent* eventPtr) (at Packages/com.unity.inputsystem/InputSystem/InputManager.cs:2355)
    UnityEngine.Experimental.Input.InputManager.OnUpdate (UnityEngine.Experimental.Input.InputUpdateType updateType, System.Int32 eventCount, System.IntPtr eventData) (at Packages/com.unity.inputsystem/InputSystem/InputManager.cs:2196)
    UnityEngine.Experimental.Input.LowLevel.NativeInputRuntime+<>c__DisplayClass6_0.<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType updateType, System.Int32 eventCount, System.IntPtr eventPtr) (at Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs:61)
    UnityEngineInternal.Input.NativeInputSystem.NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType updateType, System.Int32 eventCount, System.IntPtr eventData) (at C:/buildslave/unity/build/Modules/Input/Private/Input.cs:91)



    IndexOutOfRangeException: Index was outside the bounds of the array.
    UnityEngine.Experimental.Input.InputActionMapState.GetActionOrNull (UnityEngine.Experimental.Input.InputActionMapState+TriggerState& trigger) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:918)
    UnityEngine.Experimental.Input.InputActionMapState.GetActionOrNoneString (UnityEngine.Experimental.Input.InputActionMapState+TriggerState& trigger) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:887)
    UnityEngine.Experimental.Input.InputActionMapState.ThrowIfPhaseTransitionIsInvalid (UnityEngine.Experimental.Input.InputActionPhase currentPhase, UnityEngine.Experimental.Input.InputActionPhase newPhase, UnityEngine.Experimental.Input.InputActionMapState+TriggerState& trigger) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:871)
    UnityEngine.Experimental.Input.InputActionMapState.ChangePhaseOfAction (UnityEngine.Experimental.Input.InputActionPhase newPhase, UnityEngine.Experimental.Input.InputActionMapState+TriggerState& trigger, UnityEngine.Experimental.Input.InputActionPhase phaseAfterPerformedOrCancelled) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:778)
    UnityEngine.Experimental.Input.InputActionMapState.ProcessControlStateChange (System.Int32 mapIndex, System.Int32 controlIndex, System.Int32 bindingIndex, System.Double time, UnityEngine.Experimental.Input.LowLevel.InputEventPtr eventPtr) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:511)
    UnityEngine.Experimental.Input.InputActionMapState.UnityEngine.Experimental.Input.LowLevel.IInputStateChangeMonitor.NotifyControlStateChanged (UnityEngine.Experimental.Input.InputControl control, System.Double time, UnityEngine.Experimental.Input.LowLevel.InputEventPtr eventPtr, System.Int64 mapControlAndBindingIndex) (at Packages/com.unity.inputsystem/InputSystem/Actions/InputActionMapState.cs:397)
    UnityEngine.Experimental.Input.InputManager.FireStateChangeNotifications (System.Int32 deviceIndex, System.Double internalTime, UnityEngine.Experimental.Input.LowLevel.InputEvent* eventPtr) (at Packages/com.unity.inputsystem/InputSystem/InputManager.cs:2355)
    UnityEngine.Experimental.Input.InputManager.OnUpdate (UnityEngine.Experimental.Input.InputUpdateType updateType, System.Int32 eventCount, System.IntPtr eventData) (at Packages/com.unity.inputsystem/InputSystem/InputManager.cs:2196)
    UnityEngine.Experimental.Input.LowLevel.NativeInputRuntime+<>c__DisplayClass6_0.<set_onUpdate>b__0 (UnityEngineInternal.Input.NativeInputUpdateType updateType, System.Int32 eventCount, System.IntPtr eventPtr) (at Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs:61)
    UnityEngineInternal.Input.NativeInputSystem.NotifyUpdate (UnityEngineInternal.Input.NativeInputUpdateType updateType, System.Int32 eventCount, System.IntPtr eventData) (at C:/buildslave/unity/build/Modules/Input/Private/Input.cs:91)

    Thanks.
     
  2. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Sorry for that @Wahooney.

    Would you mind sending me your .inputactions file or posting the code that's setting up your InputActions?
     
  3. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    There you go.

    I'm side stepping this issue by moving away from InputAction assets and have started hard coding InputActions into my behaviours, which isn't great but at least it works :p
    Thanks.
     

    Attached Files:

    Last edited: Sep 25, 2018