Input System bugs

Hi,
I've been trying the new input system and so far I really like it! It's hard to pick something specific, as I didn't go truly in depth to experience the more complex new features but from the get-go: the general workflow with Action Maps/Actions, control schemes and the editable InputSettings asset which automatically generates interfaces to set things up, etc.
I'm quite eager for the hopefully more stable 1.0 version, too.

As for the problems, I've been writing down some I encountered (more on that later) – although with the work-in-progress documentation, it's hard to tell what's supposed to be working (and therefore is a bug) and what is still left to be implemented.

4338934--391624--Input.png

I guess the major problem I have is not being to able to register any input in WebGL build. It's working fine in the Editor, the build reports something like:
The devicemotion events are blocked by feature policy.
The deviceorientation events are blocked by feature policy.
This is in Unity 2018.3.8f1, so judging by this thread , would it be working if I switched to the current 2019.1 beta?

The other big trouble I had was getting the horizontal movement axis working regardless of whether a keyboard or a gamepad is used. In the setup as seen above, the keyboard axis value went (correctly) from -1 to 1, but the gamepad was inverted (1 to -1) – I'm not sure why.
I tried a number of things, from switching the positive and negative key, adding processors (like Scale: -1 or Invert), swapping min/max values… which either didn't really do anything or made the negative side always return zero.
4338934--391627--Axis1.png
In the end, I realised I just need to detect when the player is currently using a gamepad and inverted the value myself like:

float finalAxis = context.ReadValue<float>();
if (!Keyboard.current.anyKey.isPressed) finalAxis *= -1;

However, I wish I knew a better way than this.
I had problems with the "Hold" interaction, too – it immediately returned "performed" no matter what time I set up.
4338934--391633--Hold.png
I ended up with "Press And Release" and calculating the time myself. I think this might be related to the following problem:4338934--391630--Hold.gifOne thing is that it doesn't remember you overwriting the default value, but another thing (shared by interactions such as Scale etc.) is that I wasn't able to enter a decimal value.
Isn't this another problem with 'decimal comma' which the whole Package Manager seems to be currently having (case 1125027)?
In that case, I'd understand why it zeroes out all decimal values and as a result, immediately returns performed for Hold.

Then some minor stuff I wrote down:

  • Generating a new script file always produces a (harmless) error:
Assertion failed on expression: 'GetAssetScriptingType(*m_RefreshQueue.begin()) != AssetScriptingType::Script'
UnityEditor.Experimental.AssetImporters.AssetImporterEditor:OnDisable()
  • Doublicking a name (action map, action) to edit it while another name is already being edited at the moment results in only being able to write a single character at a time. Simply, losing focus doesn't close the currently editable field.

4338934--391642--Focus.gif

Due to the image limit, I'll continue in the next post.

  • And right-clicking when editing doesn't change focus either, so you might accidentally end up deleting the wrong thing

4338940--391648--Focus not changed.gif

Which also results in the following errors:

[spoiler]

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Experimental.Input.Editor.ActionInspectorContextMenu.GetSelectedActionLine () (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/ActionInspectorContextMenu.cs:141)
UnityEngine.Experimental.Input.Editor.ActionInspectorContextMenu.OnActionsContextClick (UnityEditor.SerializedProperty property) (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/ActionInspectorContextMenu.cs:48)
UnityEngine.Experimental.Input.Editor.InputActionTreeBase.ContextClicked () (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/InputActionTreeBase.cs:155)
UnityEditor.IMGUI.Controls.TreeViewController.HandleUnusedEvents () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:840)
UnityEditor.IMGUI.Controls.TreeViewController.OnGUI (UnityEngine.Rect rect, System.Int32 keyboardControlID) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:620)
UnityEditor.IMGUI.Controls.TreeView.OnGUI (UnityEngine.Rect rect) (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControl.cs:414)
UnityEngine.Experimental.Input.Editor.AssetInspectorWindow.DrawActionsColumn (System.Single width) (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/AssetInspectorWindow.cs:489)
UnityEngine.Experimental.Input.Editor.AssetInspectorWindow.OnGUI () (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/AssetInspectorWindow.cs:387)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:754)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:599)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
ArgumentException: GUILayout: Mismatched LayoutGroup.mouseDown
UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:311)
UnityEditor.EditorGUILayout.BeginScrollView (UnityEngine.Vector2 scrollPosition, System.Boolean alwaysShowHorizontal, System.Boolean alwaysShowVertical, UnityEngine.GUIStyle horizontalScrollbar, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9092)
UnityEditor.EditorGUILayout.BeginScrollView (UnityEngine.Vector2 scrollPosition, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9062)
UnityEngine.Experimental.Input.Editor.AssetInspectorWindow.DrawPropertiesColumn (System.Single width) (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/AssetInspectorWindow.cs:514)
UnityEngine.Experimental.Input.Editor.AssetInspectorWindow.OnGUI () (at Library/PackageCache/com.unity.inputsystem@0.2.1-preview/InputSystem/Editor/InputActionAsset/AssetInspectorWindow.cs:388)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.PropagateEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:754)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:599)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

[/spoiler]

  • "Waiting for input…" kept returning "scroll [Mouse]" no matter what I actually pressed.
  • Some buttons are not working on level restart, although some ("jump") do

4338940--391771--Jump.png

The last one – again, I'm not sure why but when restarting a level (= reloading the active scene), most buttons stop working, but strangely, jump seems to be working fine.
As far as I know, there's nothing persistent ("Dont Destroy On Load") in the scene, so when reloading, it should probably work the same as when entering the playmode for the first time.

The input is simply registered as:

[SerializeField] InputManager controls = default;
void Awake()
{  
    controls?.Player.SetCallbacks(this);
}
void OnEnable() => controls.Player.Enable();
void OnDisable() => controls.Player.Disable();

Thank you for the detailed feedback. Very helpful.

[quote=“Rallix”, post:1, topic: 736314]
I guess the major problem I have is not being to able to register any input in WebGL build. It’s working fine in the Editor, the build reports something like:
The devicemotion events are blocked by feature policy.
The deviceorientation events are blocked by feature policy.
This is in Unity 2018.3.8f1, so judging by this thread , would it be working if I switched to the current 2019.1 beta?
[/quote]

Could be you’re getting caught by one of the annoyances with WebGL gamepad support. One problem we have there is that the only way to get standardized gamepads (i.e. so you know that the button you’re targeting is really the one you mean) is if they follow the “standard” mapping as specified by the W3C standard. However, in my own (limited) testing I found that it very much depends on the browser, platform, AND gamepad whether you’ll get a gamepad with a mapping or a gamepad with no mapping at all.

For gamepads that do not come with a standard mapping, we would have to supply specific layouts for specific browser+platform+gamepad combinations. Not sure we’ll ever go there. Remains to be seen. Definitely a nightmare. ATM we have none of those.

What this means is that currently a gamepad on WebGL will only come out as a Gamepad in the new input system if it uses the “standard” mapping. If not, it’ll come out as a joystick. If desired, it should be possible to bypass that like so:

// Nuke definition of WebGL joysticks.
InputSystem.RemoveLayout("WebGLJoystick");

// Turn any WebGL gamepad into a Gamepad.
InputSystem.RegisterLayout<WebGLGamepad>(
    matches: new InputDeviceMatcher()
        .WithInterface("WebGL")
        .WithDeviceClass("Gamepad"));

[quote=“Rallix”, post:1, topic: 736314]
The other big trouble I had was getting the horizontal movement axis working regardless of whether a keyboard or a gamepad is used. In the setup as seen above, the keyboard axis value went (correctly) from -1 to 1, but the gamepad was inverted (1 to -1) – I’m not sure why.
I tried a number of things, from switching the positive and negative key, adding processors (like Scale: -1 or Invert), swapping min/max values… which either didn’t really do anything or made the negative side always return zero.
[/quote]

What’s the gamepad and platform? Think we had some where it was coming out incorrectly and have fixed it recently.

Looking at your setup, I’d expect it to work. However, you wouldn’t necessarily need an axis composite there. An alternative is to just bind to the gamepad stick’s X axis.

[quote=“Rallix”, post:1, topic: 736314]
I had problems with the “Hold” interaction, too – it immediately returned “performed” no matter what time I set up.
[/quote]

There was a bug with startTime and duration on actions which probably caused this. Was fixed in 0.2.6.

[quote=“Rallix”, post:1, topic: 736314]
One thing is that it doesn’t remember you overwriting the default value, but another thing (shared by interactions such as Scale etc.) is that I wasn’t able to enter a decimal value.
Isn’t this another problem with ‘decimal comma’ which the whole Package Manager seems to be currently having (case 1125027)?
[/quote]

Hmm, interesting. We have to look into that. IIRC the code here is neutral to locales meaning that it’d have to be a period not a comma. In the UI, we should probably convert for presentation on the fly. Made a note.

[quote=“Rallix”, post:1, topic: 736314]
Generating a new script file always produces a (harmless) error:
[/quote]

Haven’t seen that. I think this shouldn’t happen on 2019.1 anymore, though.

[quote=“Rallix”, post:1, topic: 736314]
Doublicking a name (action map, action) to edit it while another name is already being edited at the moment results in only being able to write a single character at a time. Simply, losing focus doesn’t close the currently editable field.
[/quote]

Confirmed. Will fix. Logged ticket here.

[quote=“Rallix”, post:2, topic: 736314]
And right-clicking when editing doesn’t change focus either, so you might accidentally end up deleting the wrong thing
[/quote]

The action editor and inspectors recently received a major overhaul that landed in 0.2.6. This is fixed as far as I can see.

Since the overhaul, we do have some error occasionally popping up when using context menus in the action error. We’re looking into that.

[quote=“Rallix”, post:2, topic: 736314]
“Waiting for input…” kept returning “scroll [Mouse]” no matter what I actually pressed.
[/quote]

Yup, known issue with the mouse. Setting a type on the action so that the mouse scroll wheel isn’t taken into account should help work around it in some cases.

[quote=“Rallix”, post:2, topic: 736314]
The last one – again, I’m not sure why but when restarting a level (= reloading the active scene), most buttons stop working, but strangely, jump seems to be working fine.
As far as I know, there’s nothing persistent (“Dont Destroy On Load”) in the scene, so when reloading, it should probably work the same as when entering the playmode for the first time.
[/quote]

Ok, that is curious. We’ll have a look.

Hi, and thank you very much for the fast reply.

[quote=“Rene-Damm”, post:3, topic: 736314]
Could be you’re getting caught by one of the annoyances with WebGL gamepad support. […]
[/quote]

Thank you for the explanation.
But does that mean when the gamepad input isn’t working, neither will the keyboard if it’s related to the same action? Just to clarify, no input works in the build, not even WASD or arrow keys.

[quote=“Rene-Damm”, post:3, topic: 736314]
“Inverted horizontal axis on a gamepad”

What’s the gamepad and platform? Think we had some where it was coming out incorrectly and have fixed it recently.
[/quote]

WebGL + the basic Xbox One wireless controller
Unity 2018.3.8f1 on Windows

[quote=“Rene-Damm”, post:3, topic: 736314]
However, you wouldn’t necessarily need an axis composite there. An alternative is to just bind to the gamepad stick’s X axis.
[/quote]

I’ll try that (don’t have the gamepad right now) and report if it helps. I originally wanted to mimic the keyboard input as close as possible, in order to handle them in the same way, but this approach seems okay, too.

[quote=“Rene-Damm”, post:3, topic: 736314]
“Generating a new script file always produces a (harmless) error”

Haven’t seen that. I think this shouldn’t happen on 2019.1 anymore, though.
[/quote]

It does. Tried with a different project, 2019.1.0b7.

Assertion failed on expression: 'GetAssetScriptingType(*m_RefreshQueue.begin()) != AssetScriptingType::Script'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Assertion failed on expression: 'GetAssetScriptingType(*m_RefreshQueue.begin()) != AssetScriptingType::Script'
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)

[quote=“Rene-Damm”, post:3, topic: 736314]
“Disabled input on restarting a level.”

Ok, that is curious. We’ll have a look.
[/quote]

We had a playtesting session today and found out it doesn’t happen always, although most of the time it does.

Here’s a gif (it starts before anything is logged into the console):
4344859--392494--Restart.gif

I wanted to try if another restart could fix the controls again – doesn’t seem so. Each successive restart in a row took more time than the previous one and eventually froze the Editor, so I’ll leave that be for now.

EDIT:
One more thing. I know it’s probably ill-advised to change the input settings during playmode, but nevertheless, if they’re saved (“Save Asset”), the Editor will then start spamming a barrage of errors after exiting it until the code is compiled again.
4344859--393370--Saved during playmode.png
I feel either the errors should be caught, or the “Save Asset” button / “Auto-Save” should be disabled during playmode.

Here's the update about the gamepad. Yes, using just leftStick/x [Gamepad] fixes the reversed input problem and now it properly matches the behaviour of the keyboard. :)
4350733--393358--X Axis.gif

Also – if I understand correctly – the Invert processor isn't meant to reverse the whole input, only to change [0..1] scale to [0..-1] for a single button, so you can use it as a negative direction – right? So when applied to a single side, it shouldn't change the whole composite axis.
Otherwise, this problem could be solely my fault for mixing Axis action type, Invert and 1D Axis Composite in weird combinations.

This is the result of experimenting with various settings for gamepads.
Movement (Axis action type):

  • Composite 1D Axis (no Invert processor)

  • Negative leftStick/left: always 0

  • Positive leftStick/right: 0 to 1
    4350733--393346--No Invert.gif

  • Composite 1D Axis (+ Invert processor only on "negative")

  • Negative leftStick/left: 0 to 1

  • Positive leftStick/right: 0 to -1
    4350733--393355--With Invert.gif

  • Composite 1D Axis (right/left swapped, without Invert)

  • Negative leftStick/right: 0 to -1

  • Positive leftStick/left: always 0
    4350733--393352--Right to Left.gif

  • Composite 1D Axis (right/left swapped, + Invert only on "negative")

  • Negative leftStick/right: always 0

  • Positive leftStick/left: always 0
    4350733--393349--Right to Left + Invert.gif

I have similar problems as Rallix in the Editor (Win10), have not tried a build. 1D Axis Composite doesn't return negative values. And 2D Vector Composite returns wrong values - stick moved up returns x0.7, y0.7; stick moved up-right returns x0, y1, stick centered (or any of the remaining directions) returns x1, y0. No any in between values and no negative values returned. Non composite alternatives work fine.

2 Likes

Yes, I can confirm the thing about Composite 2D, too.
While "Gamepad.current.leftStick.ReadValue()" works fine, Composite 2D (with leftStick/up on Up, leftStick/down on Down etc.) is a bit messed up. Look at the difference between the two approaches:
4355209--393970--Composite2D resized.gif

1 Like

[quote=“Rene-Damm”, post:3, topic: 736314]
“Decimal values in processors”

Hmm, interesting. We have to look into that. IIRC the code here is neutral to locales meaning that it’d have to be a period not a comma. In the UI, we should probably convert for presentation on the fly. Made a note.
[/quote]

Doesn’t seem so. At least in the asset file, it’s saved with a comma. I was trying to replicate the original “Mouse X/Y” axis which had smaller values than the new mouse delta:

{
    "name": "",
    "id": "9b8e225e-d2b0-46b1-9150-5c0380ceed86",
    "path": "<Mouse>/delta",
    "interactions": "",
    "processors": "Scale(factor=0,05)",
    "groups": ";Keyboard and Mouse",
    "action": "Mouse",
    "chainWithPrevious": false,
    "isComposite": false,
    "isPartOfComposite": false,
    "modifiers": ""
}

which throws an exception (Unity 2019.1.0b7 / Input System 0.2.6):

Exception while resolving binding 'Mouse:<Mouse>/delta[;Keyboard and Mouse]' in action map 'Controls (UnityEngine.Experimental.Input.InputActionAsset):Player'
UnityEngine.Experimental.Input.InputActionMap:Enable()
Exception: Cannot find public field 05 in ScaleProcessor (referenced by parameter)
UnityEngine.Experimental.Input.Layouts.InputDeviceBuilder.SetParameters (System.Object onObject, UnityEngine.Experimental.Input.Utilities.ReadOnlyArray`1[TValue] parameters) (at Library/PackageCache/com.unity.inputsystem@0.2.6-preview/InputSystem/Devices/InputDeviceBuilder.cs:890)
UnityEngine.Experimental.Input.InputBindingResolver.ResolveProcessors (System.String processorString) (at Library/PackageCache/com.unity.inputsystem@0.2.6-preview/InputSystem/Actions/InputBindingResolver.cs:613)
UnityEngine.Experimental.Input.InputBindingResolver.AddActionMap (UnityEngine.Experimental.Input.InputActionMap map) (at Library/PackageCache/com.unity.inputsystem@0.2.6-preview/InputSystem/Actions/InputBindingResolver.cs:242)
UnityEngine.Experimental.Input.InputActionMap:Enable()

When I edit the factor directly in the file and change the comma to a period, the exception is gone, but the Scale processor still doesn’t seem to be working, so I ended up dividing the read value in code.

Yup, the code was indeed not handling locales correctly. Should be fixed here and be included in the next package.

Still digging through the rest here :)

1 Like

[quote]
[quote]
I had problems with the "Hold" interaction, too – it immediately returned "performed" no matter what time I set up.
[/quote]
There was a bug with startTime and duration on actions which probably caused this. Was fixed in 0.2.6.
[/quote]

I'm using Unity 2019.1.1f1 with the Input System 0.2.8...

having the same problem, hold returns performed immediately after start, no matter the time

@Rene-Damm I'm also having problems with the input system setting my decimal inputs for processors and interactions back to 0 - and getting (0.7, 0.7) as a result from a d-Pad.

I would also like to give some feedback regarding the input reading system. I am really missing a function that lets me read the current state of an input instead of only being given the event when the input fires. This necessitates a lot of extra code to handle the input state when .performed is not being fired.

Is there a best practice example I can look at?

@Rene-Damm When are these bugs going to be fixed?

I'm currently having an issue where when pushing various directions rapidly, sometimes they never call the cancelled phase event so my character just runs on forever despite not touching any buttons. I've gotten it to happen somewhat consistently by pressing all the wasd keys and then letting them all go at the same time. It's weird though, if I pause and play again, the event fires.

Has anyone else had this issue? My apologies if this was listed above, I didn't see it.

I'm currently on 2019.1.4f1
Input system 0.2.10

@Rene-Damm I downloaded the latest update and some of the issues are fixed :) But now I can't seem to make my input C# class public. (doesnt show in the inspector)

I've been getting this error for a while...

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.SettingsProvider.Repaint () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Settings/SettingsProvider.cs:123)
UnityEngine.InputSystem.Editor.InputSettingsProvider.ForceReload () (at /Volumes/XYZ/Unity/Custom Packages/InputSystem/Packages/com.unity.inputsystem/InputSystem/Editor/Settings/InputSettingsProvider.cs:356)
UnityEngine.InputSystem.InputSystem.OnProjectChange () (at /Volumes/XYZ/Unity/Custom Packages/InputSystem/Packages/com.unity.inputsystem/InputSystem/InputSystem.cs:1682)
UnityEngine.InputSystem.LowLevel.NativeInputRuntime.OnProjectChanged () (at /Volumes/XYZ/Unity/Custom Packages/InputSystem/Packages/com.unity.inputsystem/InputSystem/NativeInputRuntime.cs:228)
UnityEditor.EditorApplication.Internal_CallProjectHasChanged () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:345)

in 2019.2.0b4 &b5

EDIT: This seems to be triggered by any change in the Input System Package settings in Project settings.

1 Like

I'll just want to put a little update here on some of the problems.
In the newest version of Input System, with the "self-contained" wrapper:
– the controls no longer randomly disable themselves when the scene is reloaded
– input in WebGL works for me again
So, at least for me, the major two issues I had are no longer a problem.

Okay, right now Input System went almost sillent. Again. In debug view I see events happening, yet device variables completely frozen. Restarting editor and reinstalling Input System from scratch doesn't helped a bit. And what bothers me most, I got no idea how to reproduce this...

Only idea is, I've tried to get "Handle is not allocated" error two days ago, which is obviously messes up with memory... but two days of a reaction time? Nope.

So, reboot is seems only option to fix this. Okay. But why this happening?

Upd: I was a little bit hasty writing about it and not googling. So if anyone interested / having same issue, here it is: https://github.com/Unity-Technologies/InputSystem/issues/607
Yet, not a single clue "why?"

1 Like

The input system doesn't recognize float values from my x360 gamepad. Also, it seems to totally ignore input from the sticks that is left or down. (using the listening function in the Path field returns nothing when tilting the left stick to the left or downwards) This is on version 0.2.10

I'm trying to build on iOS but the app crashes after the logos. Xcode points to the return at the end of this code...

// System.Void* UnityEngine.InputSystem.LowLevel.InputStateBuffers_DoubleBuffers::GetFrontBuffer(System.Int32)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void* DoubleBuffers_GetFrontBuffer_mE534D7CDE9DC24C1F08B5B2298B8D548A44E9B82 (DoubleBuffers_t2AE9E33A12B07CE51EFCA40422A9ACB619F7DA69 * __this, int32_t ___deviceIndex0, const RuntimeMethod* method)
{
    {
        void** L_0 = __this->get_deviceToBufferMapping_0();
        int32_t L_1 = ___deviceIndex0;
        uint32_t L_2 = sizeof(void*);
        return (void*)((*((intptr_t*)((void**)il2cpp_codegen_add((intptr_t)L_0, (intptr_t)((intptr_t)il2cpp_codegen_multiply((intptr_t)(((intptr_t)((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)2)))), (int32_t)L_2)))))));
    }
}

This is with Unity 2019.2.0b5. Using the develop branch of the Input System. Any idea what might be going wrong (aside from the fact I'm using a beta version of Unity and an unstable branch? :) )


I'm getting the same problem and it make shader graph stop to work.

Windows 10
Version 2019.2.0b5 (e3a10156d6de) Personal

{
  "dependencies": {
    "com.unity.ads": "2.0.8",
    "com.unity.analytics": "3.3.2",
    "com.unity.cinemachine": "2.3.4",
    "com.unity.collab-proxy": "1.2.16",
    "com.unity.formats.fbx": "2.0.1-preview.11",
    "com.unity.ide.rider": "1.0.4",
    "com.unity.ide.visualstudio": "1.0.5",
    "com.unity.ide.vscode": "1.0.4",
    "com.unity.inputsystem": "0.2.10-preview",
    "com.unity.package-manager-ui": "2.2.0",
    "com.unity.probuilder": "4.0.5",
    "com.unity.purchasing": "2.0.6",
    "com.unity.quicksearch": "1.2.4-preview",
    "com.unity.render-pipelines.high-definition": "6.7.1-preview",
    "com.unity.textmeshpro": "2.0.1",
    "com.unity.timeline": "1.1.0",
    "com.unity.modules.ai": "1.0.0",
    "com.unity.modules.animation": "1.0.0",
    "com.unity.modules.assetbundle": "1.0.0",
    "com.unity.modules.audio": "1.0.0",
    "com.unity.modules.cloth": "1.0.0",
    "com.unity.modules.director": "1.0.0",
    "com.unity.modules.imageconversion": "1.0.0",
    "com.unity.modules.imgui": "1.0.0",
    "com.unity.modules.jsonserialize": "1.0.0",
    "com.unity.modules.particlesystem": "1.0.0",
    "com.unity.modules.physics": "1.0.0",
    "com.unity.modules.physics2d": "1.0.0",
    "com.unity.modules.screencapture": "1.0.0",
    "com.unity.modules.terrain": "1.0.0",
    "com.unity.modules.terrainphysics": "1.0.0",
    "com.unity.modules.tilemap": "1.0.0",
    "com.unity.modules.ui": "1.0.0",
    "com.unity.modules.uielements": "1.0.0",
    "com.unity.modules.umbra": "1.0.0",
    "com.unity.modules.unityanalytics": "1.0.0",
    "com.unity.modules.unitywebrequest": "1.0.0",
    "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    "com.unity.modules.unitywebrequestaudio": "1.0.0",
    "com.unity.modules.unitywebrequesttexture": "1.0.0",
    "com.unity.modules.unitywebrequestwww": "1.0.0",
    "com.unity.modules.vehicles": "1.0.0",
    "com.unity.modules.video": "1.0.0",
    "com.unity.modules.vr": "1.0.0",
    "com.unity.modules.wind": "1.0.0",
    "com.unity.modules.xr": "1.0.0"
  }
}