InputSystem icon indicating copy to clipboard operation
InputSystem copied to clipboard

Errors if have an action map with no actions

Open VR-Architect opened this issue 7 years ago • 1 comments

FYI, I put an action map with no actions in my Input Actions and got the errors below. You may consider a more user friendly error or not throw an error at all. You may ask, why put in an action map with no actions? Good question, it was a place holder to remind me later to add an action for vehicles. I removed the action map and the errors went away.

Running Unity 2019.2.11 with Input System 0.2.6 preview. New project using the HDRP template with XR/VR activated.

Errors:

ArgumentNullException: Value cannot be null.

Parameter name: path
UnityEngine.Experimental.Input.InputControlPath.TryFindControl[TControl] (UnityEngine.Experimental.Input.InputControl control, System.String path, System.Int32 indexInPath) (at Library/PackageCache/[email protected]/InputSystem/Controls/InputControlPath.cs:397)
UnityEngine.Experimental.Input.InputControlPath.TryFindControl (UnityEngine.Experimental.Input.InputControl control, System.String path, System.Int32 indexInPath) (at Library/PackageCache/[email protected]/InputSystem/Controls/InputControlPath.cs:358)
UnityEngine.Experimental.Input.InputActionState.CanUseDevice (UnityEngine.Experimental.Input.InputDevice device) (at Library/PackageCache/[email protected]/InputSystem/Actions/InputActionState.cs:278)
UnityEngine.Experimental.Input.InputActionState.OnDeviceChange (UnityEngine.Experimental.Input.InputDevice device, UnityEngine.Experimental.Input.InputDeviceChange change) (at Library/PackageCache/[email protected]/InputSystem/Actions/InputActionState.cs:3206)
UnityEngine.Experimental.Input.InputManager.AddDevice (UnityEngine.Experimental.Input.InputDevice device) (at Library/PackageCache/[email protected]/InputSystem/InputManager.cs:983)
UnityEngine.Experimental.Input.InputManager.AddDevice (UnityEngine.Experimental.Input.Utilities.InternedString layout, System.Int32 deviceId, UnityEngine.Experimental.Input.Layouts.InputDeviceDescription deviceDescription, UnityEngine.Experimental.Input.InputDevice+DeviceFlags deviceFlags, UnityEngine.Experimental.Input.Utilities.InternedString variants) (at Library/PackageCache/[email protected]/InputSystem/InputManager.cs:931)
UnityEngine.Experimental.Input.InputManager.AddDevice (UnityEngine.Experimental.Input.Layouts.InputDeviceDescription description, System.Boolean throwIfNoLayoutFound, System.Int32 deviceId, UnityEngine.Experimental.Input.InputDevice+DeviceFlags deviceFlags) (at Library/PackageCache/[email protected]/InputSystem/InputManager.cs:1043)
UnityEngine.Experimental.Input.InputManager.RestoreDevicesAfterDomainReload () (at Library/PackageCache/[email protected]/InputSystem/InputManager.cs:3319)
UnityEngine.Experimental.Input.LowLevel.<>c__DisplayClass8_0:<set_onBeforeUpdate>b__0(NativeInputUpdateType)
UnityEngineInternal.Input.NativeInputSystem:NotifyBeforeUpdate(NativeInputUpdateType) (at C:/buildslave/unity/build/Modules/Input/Private/Input.cs:99)
Could not re-recreate input device 'Touchscreen (Win32)' with layout 'Touchscreen' and variants 'Default' after domain reload
UnityEngine.Experimental.Input.LowLevel.<>c__DisplayClass8_0:<set_onBeforeUpdate>b__0(NativeInputUpdateType)
UnityEngineInternal.Input.NativeInputSystem:NotifyBeforeUpdate(NativeInputUpdateType) (at C:/buildslave/unity/build/Modules/Input/Private/Input.cs:99)

VR-Architect avatar Apr 14 '19 21:04 VR-Architect

Having empty map in Input Action UI doesn't generate error message. Doesn't repro with 2019.1.0f2 or 2019.2.0a13.

JiaUnity avatar Apr 19 '19 01:04 JiaUnity