Search Unity

Input System Update

Discussion in 'New Input System' started by Rene-Damm, Dec 12, 2017.

  1. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    63
    alexr1221 likes this.
  2. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,012
    I noticed that this issue report was logged for above post: https://github.com/Unity-Technologies/InputSystem/issues/74 and it's been recently closed, yet the very latest input system still has this issue on your SimpleDemo. I've tried adjusting the deadzones and sensitivity but it's always moving mouse in "chunks". It seems to wait for certain threshold for total movement amount to exceed before it moves at all.
    You refer to the above or are there other issues with the mouse?
     
  3. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Hey everyone,

    We made it to the production server. 0.1.2-preview can be installed directly from the package manager UI now. For details see here.

    As part of focusing our efforts, we've also decided to drop support for .NET 3.5 and focus exclusively on the new runtime. This means that once we have removed the old .NET 3.5 code, projects using the new input system require using .NET 4.

    Documentation has also started progressing finally. ATM it's still little more than a skeleton and there's still lots to write but things are moving. The most up-to-date WIP version can be found here. Docs can also be accessed through "View documentation" link in the package manager UI. The scripting ref still needs *a lot* of cleanup.

    Finally, we're in the process of working the kinks out of the system. Lots of little stuff. Proper fixed vs dynamic update handling with timeslicing is coming (just need to land the native changes for it). And confusion around how/when actions update is getting sorted. Plus lots of bugs that we're starting to whittle down.

    Thanks everyone for bearing with us and helping this take shape.

    Thank you. I'll have a look.

    Could you provide some details about Unity version, .NET version, and OS? Are you using actions and seeing the chunkiness on them or are you reading from the mouse directly? Is this with the position or the delta values or both?

    I've seen similar problems on 2019.1 where there seems to be a deeper issue with the native input system side which we still have to investigate.

    We recently fixed a number of issuing surround Mouse, but there may well be more. I've seen stuck buttons on the Mac, for example, which needs to be investigate.
     
  4. cecilcruxis

    cecilcruxis

    Joined:
    Sep 17, 2013
    Posts:
    91
    Thank you for the hard work. I know the team had some rocky areas in development early on, but it was always nice to see you guys make it through all of it. The package system is nice since I no longer have to pull from github repos which wasn't too bad anyways.

    For the .NET 3.5 I think most people will be mostly happy about it honestly. The less stuff to have to keep backwards compatible with, the less bugs and easier improving stuff will be. Now to go through all the current docs to make sure I haven't missed any cool function I might of not known about.
     
    sand_lantern and recursive like this.
  5. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Thanks @cecilcruxis :)

    Unfortunately, we're still missing large chunks. Like, `InputUser` is still completely absent from the docs. Bunch things are little more than placeholders. By mid-January, we should be in good shape as far as comprehensiveness is concerned. Then we hopefully get some help to turn my programmer-geek-speak explanations into nicely flowing and helpful docs :D
     
  6. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,012
    Ah true, I actually tested with 2019.1.0a12. Using .NET 4.x and Win10 Pro x64.

    I now tried the demo project again on 2018.3.0f2 and mouse did definitely work better there. Your input seems very raw for mouse tho, will there be some built-in filtering options for it? I didn't seem to see noticeable difference on the "project settings->input (new)->filter noise on current" but I don't think the noise is the main issue with raw mouse data but that data is just coming in infrequently(?) / can have low resolution depending on the mouse sensor.

    Also, are there any estimates when the mouse will work again on 2019.1? :)
     
  7. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,350
    With good example scenes to demonstrate it all...
     
  8. N3uRo

    N3uRo

    Joined:
    Dec 10, 2011
    Posts:
    627
    I see this is still a problem. Any news?
     
  9. MrG

    MrG

    Joined:
    Oct 6, 2012
    Posts:
    294
    Does this mean Unity is finally adopting CLS Compliance?
     
  10. SkyFox_x

    SkyFox_x

    Joined:
    Jun 11, 2018
    Posts:
    3
    Hey. I apologize if there was already a similar question. How can I track any button presses on any of my devices and display exactly which button was pressed. that is, how it is implemented in games,
    To change the control scheme you can click on the desired button and it will become involved for a specific action (a simple system of binding in games). sorry for my english, it is bad.
     
  11. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    This one went through a re-evaluation. After initially the decision was made to switch *all* our new APIs to the new convention, we realized that we would end up with rather inconsistent APIs in UnityEngine and UnityEditor (you'd have one property being lowerCase and another being UpperCase, for example). So the decision was made to keep everything under the UnityEngine and UnityEditor namespace under the old conventions and everything under Unity, where the "new world" APIs live, under the new conventions.

    For input, this means that the current input APIs under UnityEngine will stay on the old conventions. There will be new APIs (likely Unity.Input) that will follow the new conventions.

    I think no. We definitely want to align ourselves more with the wider .NET world and get rid of some old "Unitysms" but CLS Compliance is not the goal AFAIK. In fact, many of the new APIs are going almost the opposite way as there's quite a bit of use of C#'s unsafe subset.

    PerformInteractiveRebinding() is probably what you're looking for. I recommend taking a look at the rebinding tests. Sorry to be posting links to tests rather than docs, but in the absence of the latter, it's the best source of information ATM. Docs will follow soon.

    The rebinding apparatus still needs its kinks worked out but the basics should be there.
     
  12. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    546
    Hey @Rene-Damm , after tinkering around with figuring out how to display debug info in LWRP (an adventure in itself), I was wondering if we could have visualizers for different stages of Interactions and Processors, like this article describes:
    https://www.gamasutra.com/blogs/Rya...37/Interpreting_Analog_Sticks_in_INVERSUS.php

    Obviously this wouldn't be a 1.0-release feature, but something I think would be extremely handy for debugging complex games and nailing down game feel.
     
    Ofx360 likes this.
  13. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    I'd love that. Overall, I have a long list of debugging/visualization/profiling stuff that I'd like to see tackled post-1.0. I think the input debugger was a good first step in at least surfacing basic activity but there's so much that can be done beyond that.

    IMO having input in the profiler window should be the first step after 1.0-preview (we're still missing APIs to allow packages to add their own profilers to the window). I'd like to clearly see event/update activity and input lag. E.g. seeing that in frame X gamepad events on average took 0.5ms from generation to processing. Stuff like that.

    But beyond that, having visualizations like those in the article readily available would be awesome.

    Thanks for the link. Super interesting article.
     
    Ofx360 and recursive like this.
  14. Tekksin

    Tekksin

    Joined:
    Oct 20, 2013
    Posts:
    32
    Sometimes my "joystock" disconnects and is not re-read by unity. it comes up null in the console as Joystick reconnected ("").

    It's not some weird unknown controller, it's a ps4 controller. Does this input system at all address that? Currently a full restart of my computer is the only thing that fixes this so that unity recognizes it. It's very annoying, since I need a controller to test my game, and every inch of code I write.
     
  15. MakabreGaming

    MakabreGaming

    Joined:
    Mar 30, 2017
    Posts:
    31
    Is it recognized by OS? If it's not recognized by it then it shouldn't be a problem in unity itself. I am using PS4 controller but it reconnects fine for me, I have a broken power exit on controller, so it turns on and off all the time.
     
  16. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    784
    Hi, any news on being able to set the mouse-cursor position?
     
  17. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Code (CSharp):
    1. Mouse.current.WarpCursorPosition(new Vector2(123, 234));
    Where supported (IIRC only Win, Mac, and UWP currently).
     
    johnabruce and dadude123 like this.
  18. Tekksin

    Tekksin

    Joined:
    Oct 20, 2013
    Posts:
    32
    The problem is the controller only stops working while I'm using Unity. I can use it on steam for hours and hours, but for some reason Unity disconnects it, and it resurfaces in the console with a null name, and I then have to restart my computer. I'm really at a loss, considering only Unity knows what they do differently with controllers. I'm surprised I'm the only person experiencing this.
     
  19. fderudder

    fderudder

    Joined:
    Apr 13, 2010
    Posts:
    27
    Hi.

    First, I really like the Action/Binding asset. Way more flexible to setup than the vanilla inputs. It seems to go in the right direction, and I'm looking forward to see it hit v1.0. Thank you also for being reactive on the forum, much appreciated.

    In the current state of things, is it possible to have a mention of the github wiki in the current package documentation? Clicking in the doc link in the Package Manager is my first reflex, so I actually spent some time confused and wondering if I was missing something before coming here and finding mentions of the github wiki.

    And in term of feature request, I'd like to have the ability to specify the path where the generated class for the asset should go. As for why, I'm currently strictly separating code and data. This is an asset, so for me, it goes into Data. The only scripts that I have are all in their respective asmdef-bound folders, so everytime I change this, I have to manually move the file over, it's a bit annoying. Nothing deal breaker, but would be cool.

    (see the next message for this: it's already possible by specifying the path in the filename)

    upload_2019-1-18_19-41-45.png

    Cheers
    Flo
     
    Last edited: Jan 18, 2019
  20. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,628
    inputconfig.PNG

    (my MenuInput.inputactions is in a completely different folder)
     
  21. fderudder

    fderudder

    Joined:
    Apr 13, 2010
    Posts:
    27
    Ah damn, I didn't think about that field being able to handle a filepath. Thanks a lot!

    (I feel a bit dumb there, I should have tried that. Cheers, I'll edit my post)
     
  22. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,628
    :) Don't break a sweat about it, probably at some point or another we all have been there and done that.
     
  23. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Hey everyone,

    Given it's touching on a feature area that has come up in many requests and given that part of the responses I gave are obsoleted by now, I'd like to give a more general update here.

    We've been working on a new set of components that wrap around the new input system at a high level and are meant to make setting up player input (including local co-op setups) a lot easier.

    If you're curious, I've recorded a video and posted it here. Please note that this was initially recorded for internal use. I apologize for the very bad audio quality (after this one, I've finally gone and ordered a proper microphone :)), for my frequent mumbling, and for the use of some words I shouldn't have used. Hope you don't mind :)

    Once this stuff is more or less finished, a video of higher quality will follow.

    The biggest pain point we're trying to address is the initial setup cost of the system as well as the fact that while there is a lot of APIs now that provide extensive input-related services, much of it requires significant custom scripting to integrate (for example, APIs like InputUser). We do think it's great to have these APIs so that should you need the flexibility, you can build directly on them, but we've also seen the pain involved in setting up even rudimentary action-based input.

    All the functionality we're building around these components is in turn directly built on top of public APIs available in the new input system. And the components are purely optional and not otherwise required by the system to function.

    Comments and feedback appreciated.
     
  24. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,628
    Nice touch! SendMessage is a good solution for simple, low-performance games, but I guess it would be a very bad choice for the high performance ones. I really like where the new input system heading towards, very feature rich and still very simple (on its level, the event/action setup isn't that complicated for bigger applications either).

    So thank you for sharing this, it's great in my opinion.

    I also would like to see different levels of helper components. For example, I probably will stay with the lower level of input handling, because that is more in line with my overall architecture and it does not take away the control how and when perform what.
    On the other hand it would be great to get some help with redefinition of bindings and/or displaying what is already in there. Maybe even to detect if a device is available or not or even "hot swap" them. Like imagine a settings when the rebinding of the keys/mouse buttons is available if keyboard/mouse are present and the rebinding of the gamepad is present if a (any kind of) gamepad is available. Or even becomes available.
     
  25. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Thank you for the feedback @Lurking-Ninja :)

    My hope is we can pick that up as part of the demo work which has a rebinding UI as a requirement. Whatever comes out of that should be reusable. Agree that ATM you have to do quite a bit of custom scripting to build this kind of thing with what's there.

    Just to make sure I understand correctly, you mean automatically targeting the currently used control scheme for rebinding?

    Hopefully the rebinding helpers will come out flexible enough to allow heavy customization both of how the rebinds are handled as well as of how they are presented UI-wise.
     
    Lurking-Ninja and FROS7 like this.
  26. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    784
    Hey, just stopping by to say thanks.

    WarpCursorPosition is working perfectly fine.
    I was half expecting it to mess up the deltas, but it doesn't, which is great!

    I also did some basic experimentation with the "Actions" and that works nicely as well.

    Also, automatically displaying the "friendly names" of all button on the Xbox360 usb controller, wow! (I guess it's very common controller, but still, that's awesome)
     
    Last edited: Jan 31, 2019
    Rene-Damm likes this.
  27. johnabruce

    johnabruce

    Joined:
    May 10, 2015
    Posts:
    25
    First, I am liking the new input. I can't wait to implement this in my game...so cool.

    Just installed the new 2019.1.0b1 and added the input package preview and it won't compile. Thought you might want to know about this.

    Library\PackageCache\com.unity.inputsystem@0.1.2-preview\InputSystem\NativeInputRuntime.cs(107,25): error CS1593: Delegate 'NativeUpdateCallback' does not take 3 arguments

    Thanks.
     
  28. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Yeah, unfortunately we're having a bit of a bumpy time synchronizing with some of the native changes and backports. 2019.1 support will be fixed in the next package (due out any day now).
     
    GilbertoBitt and FROS7 like this.
  29. johnabruce

    johnabruce

    Joined:
    May 10, 2015
    Posts:
    25
    Thank you. May the blessing of no unhandled exceptions thrown be yours always.
     
    GilbertoBitt likes this.
  30. johnabruce

    johnabruce

    Joined:
    May 10, 2015
    Posts:
    25
    Does anyone know if Unity 2019.2.0a4 works with the current Input System alpha 0.1.2 package? I don't want to download and install until it is in working order.
     
  31. maburnside

    maburnside

    Joined:
    Feb 7, 2019
    Posts:
    1
    I was going to answer your question, but it doesn't even seem like the package manager works with 2019.2.0a4, so I can't. All I can tell you is that it doesn't work in 2019.1.0b2, so may as well wait until the update comes.
     
  32. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,012
    PM works for me on 2019.2.0a4. If it fails, it's probably the same old cause (you have some other errors on your project that prevent it from loading up).
     
  33. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,628
    Sorry for the late reply, I was a little bit busy with my day job for a while (it happens... :D)

    Yes, I was trying to refer to that also to events when any of the currently chosen scheme's targeted device comes online or goes offline (eg: turn on or off controllers, pull/plug the keyboard or mouse, etc).
     
  34. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    0.2-preview is live. Took a while and has a number of issues but we felt it's super important we finally get a new package out the door. Next one shouldn't take this long.

    Changelog is here. There's several big changes to actions. There's still work to do but I feel it's a good step in the right direction.

    For the next package (0.3-preview), touch will be a major point of focus. Plus probably more action stuff and bugs around that area.
     
  35. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    61
    So i've come back to test the input system on 0.2 (2019.1.0b3), but i can't get the input system working anymore

    I started up a brand new scene to test out this script:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.Experimental.Input;
    5.  
    6. public class NewBehaviourScript : MonoBehaviour
    7. {
    8.     public InputAction action;
    9.  
    10.     void Awake()
    11.     {
    12.         action = new InputAction("Test");
    13.  
    14.         action.AddBinding("<Keyboard>/e")
    15.             .WithInteraction("Press");
    16.  
    17.         action.performed += ctx =>
    18.         {
    19.             Debug.Log("!");
    20.         };
    21.     }
    22.  
    23.     void OnEnable()
    24.     {
    25.         action.Enable();
    26.     }
    27.  
    28.     void OnDisable()
    29.     {
    30.         action.Disable();
    31.     }
    32.  
    33.     void Update()
    34.     {
    35.         if (Keyboard.current.eKey.isPressed)
    36.         {
    37.             Debug.Log("!!");
    38.         }
    39.  
    40.         if (InputSystem.GetDevice<Keyboard>().eKey.isPressed)
    41.         {
    42.             Debug.Log("!!!");
    43.         }
    44.     }
    45. }
    46.  
    No response for anything.

    Here are some misc settings:

    upload_2019-2-15_0-42-20.png

    upload_2019-2-15_0-44-5.png

    upload_2019-2-15_0-48-51.png

    I tried changing the UpdateMode to 'InputSettings.UpdateMode.ProcessEventsInDynamicUpdateOnly', but that didn't do anything.

    One thing I've noticed is that none of the values change in the 'Controls' window:
    upload_2019-2-15_0-54-6.png

    No matter what i press, the 'Events' window will spam events, but the 'Controls' window stays static. I believe, in the past, these values would update in real time, but not anymore. Dunno if that has anything to do with this issue though
     

    Attached Files:

  36. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    61
    Also while i'm here:

    - Unplugging my keyboard reliably crashes Unity (only with Input System installed)
    - Plugging in an 8Bitdo Gamepad, i get these weird characters (probably a fallback from Chinese) in the Unsupported devices list which causes A LOT of errors
    upload_2019-2-15_1-18-38.png

    when you press play, you're slammed with error messages that continue even when you quit play mode:
    upload_2019-2-15_1-20-3.png

    Memory usage in task manager:

    upload_2019-2-15_1-21-35.png
     
    Last edited: Feb 15, 2019
  37. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    546
    There seems to be a lot of crashing in the editor with the native input system in 2019.1b3 (like a lot) related to to window input handling. Seems to break down somewhere in
    win::HIDInputThreadState::HIDDevice::IOCTL
    .

    Here's the useful part of the log with the stacktrace:

    0x00007FF772135BC8 (Unity) win::HIDInputThreadState::HIDDevice::IOCTL
    0x00007FF76FCE00C7 (Unity) InputDeviceIOCTL
    0x00007FF76FE9F079 (Unity) NativeInputSystem_CUSTOM_IOCTL
    0x000002D1BA93E30B (Mono JIT Code) (wrapper managed-to-native) UnityEngineInternal.Input.NativeInputSystem:IOCTL (int,int,intptr,int)
    0x000002D1BA93DEBB (Mono JIT Code) [C:\dev\Ti\TiGame\Library\PackageCache\com.unity.inputsystem@0.2.0-preview\InputSystem\NativeInputRuntime.cs:55] UnityEngine.Experimental.Input.LowLevel.NativeInputRuntime:DeviceCommand (int,UnityEngine.Experimental.Input.LowLevel.InputDeviceCommand*)
    0x000002D1FFFD4B79 (Mono JIT Code) [C:\dev\Ti\TiGame\Library\PackageCache\com.unity.inputsystem@0.2.0-preview\InputSystem\IInputRuntime.cs:177] UnityEngine.Experimental.Input.LowLevel.InputRuntimeExtensions:DeviceCommand<UnityEngine.Experimental.Input.LowLevel.RequestSyncCommand> (UnityEngine.Experimental.Input.LowLevel.IInputRuntime,int,UnityEngine.Experimental.Input.LowLevel.RequestSyncCommand&)
    0x000002D1FFFD49C3 (Mono JIT Code) [C:\dev\Ti\TiGame\Library\PackageCache\com.unity.inputsystem@0.2.0-preview\InputSystem\Devices\InputDevice.cs:376] UnityEngine.Experimental.Input.InputDevice:ExecuteCommand<UnityEngine.Experimental.Input.LowLevel.RequestSyncCommand> (UnityEngine.Experimental.Input.LowLevel.RequestSyncCommand&)
    0x000002D1FFFD40F3 (Mono JIT Code) [C:\dev\Ti\TiGame\Library\PackageCache\com.unity.inputsystem@0.2.0-preview\InputSystem\InputSystem.cs:789] UnityEngine.Experimental.Input.InputSystem:TrySyncDevice (UnityEngine.Experimental.Input.InputDevice)
    0x000002D1FFFD3DC3 (Mono JIT Code) [C:\dev\Ti\TiGame\Library\PackageCache\com.unity.inputsystem@0.2.0-preview\InputSystem\InputManager.cs:2179] UnityEngine.Experimental.Input.InputManager:OnFocusChanged (bool)
    0x000002D1FFFD3C3A (Mono JIT Code) [C:\dev\Ti\TiGame\Library\PackageCache\com.unity.inputsystem@0.2.0-preview\InputSystem\NativeInputRuntime.cs:225] UnityEngine.Experimental.Input.LowLevel.NativeInputRuntime:OnFocusChanged (bool)
    0x000002D1FFFD37E7 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\Export\Application\Application.cs:323] UnityEngine.Application:InvokeFocusChanged (bool)
    0x000002D1FFFD39AE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_byte (object,intptr,intptr,intptr)
    0x00007FF825E6BF9B (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
    0x00007FF825DF1F32 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:2919] do_runtime_invoke
    0x00007FF825DFAF3F (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:2966] mono_runtime_invoke
    0x00007FF7720AFDB6 (Unity) scripting_method_invoke
    0x00007FF7720AA1F5 (Unity) ScriptingInvocation::Invoke
    0x00007FF7720A5515 (Unity) ScriptingInvocation::Invoke<void>
    0x00007FF76F87FD3B (Unity) Scripting::UnityEngine::ApplicationProxy::InvokeFocusChanged
    0x00007FF771BDC2EA (Unity) SetPlayerFocus
    0x00007FF7711729A7 (Unity) InternalEditorUtility_CUSTOM_OnGameViewFocus
    0x000002D1F96EF6FE (Mono JIT Code) (wrapper managed-to-native) UnityEditorInternal.InternalEditorUtility:OnGameViewFocus (bool)
    0x000002D1FFFD34B3 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\GameView\GameView.cs:424] UnityEditor.GameView:OnLostFocus ()
    0x000002D1E8CD35A0 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FF825E6BF9B (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
    0x00007FF825DF1F32 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:2919] do_runtime_invoke
    0x00007FF825DFB112 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:3071] mono_runtime_invoke_checked
    0x00007FF825DFB8A9 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:5262] mono_runtime_try_invoke_array
    0x00007FF825DFB0A6 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:5140] mono_runtime_invoke_array_checked
    0x00007FF825D9FFC4 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\icall.c:3358] ves_icall_InternalInvoke
    0x000002D1E550F726 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
    0x000002D1E554F5AB (Mono JIT Code) System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    0x000002D1E692FE4F (Mono JIT Code) System.Reflection.MethodBase:Invoke (object,object[])
    0x000002D1F96E5573 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:344] UnityEditor.HostView:Invoke (string,object)
    0x000002D1F96E53C3 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:339] UnityEditor.HostView:Invoke (string)
    0x000002D1FFD8E1C3 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:167] UnityEditor.HostView:OnLostFocus ()
    0x000002D1E8CD3428 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007FF825E6BF9B (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
    0x00007FF825DF1F32 (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:2919] do_runtime_invoke
    0x00007FF825DFAF3F (mono-2.0-bdwgc) [c:\users\builduser\builds\1r5m1xkj\0\vm\mono\mono\metadata\object.c:2966] mono_runtime_invoke
    0x00007FF7720AFDB6 (Unity) scripting_method_invoke
    0x00007FF7720AA1F5 (Unity) ScriptingInvocation::Invoke
    0x00007FF7720AA49E (Unity) ScriptingInvocation::InvokeChecked
    0x00007FF772104742 (Unity) SerializableManagedRef::CallMethod
    0x00007FF770BA9E22 (Unity) GUIView::GUIViewWndProc
    0x00007FF895CA6D41 (USER32) CallWindowProcW
    0x00007FF895CA6A1C (USER32) CallWindowProcW
    0x00007FF895CB04D3 (USER32) IsWindowVisible
    0x00007FF89889E6B4 (ntdll) KiUserCallbackDispatcher
    0x00007FF895801164 (win32u) NtUserMessageCall
    0x00007FF895CA46F6 (USER32) GetWindowTextW
    0x00007FF895CA3ED2 (USER32) UpdateWindow
    0x00007FF8927D5C0A (uxtheme) HitTestThemeBackground
    0x00007FF8927DF342 (uxtheme) Ordinal96
    0x00007FF8927D4A34 (uxtheme) HitTestThemeBackground
    0x00007FF8927D34E1 (uxtheme) HitTestThemeBackground
    0x00007FF895CA4414 (USER32) GetWindowTextW
    0x00007FF770BA51FD (Unity) ContainerWindow::ContainerWndProc
    0x00007FF895CA6D41 (USER32) CallWindowProcW
    0x00007FF895CA6A1C (USER32) CallWindowProcW
    0x00007FF895CB04D3 (USER32) IsWindowVisible
    0x00007FF89889E6B4 (ntdll) KiUserCallbackDispatcher
    0x00007FF895801164 (win32u) NtUserMessageCall
    0x00007FF895CA46F6 (USER32) GetWindowTextW
    0x00007FF895CA3ED2 (USER32) UpdateWindow
    0x00007FF8927D5C0A (uxtheme) HitTestThemeBackground
    0x00007FF8927DF034 (uxtheme) GetThemeAppProperties
    0x00007FF8927D4A34 (uxtheme) HitTestThemeBackground
    0x00007FF8927D34E1 (uxtheme) HitTestThemeBackground
    0x00007FF895CA4414 (USER32) GetWindowTextW
    0x00007FF770BA51FD (Unity) ContainerWindow::ContainerWndProc
    0x00007FF895CA6D41 (USER32) CallWindowProcW
    0x00007FF895CA6713 (USER32) DispatchMessageW
    0x00007FF770BADF4C (Unity) MainMessageLoop
    0x00007FF770BB7747 (Unity) WinMain
    0x00007FF7734C4EAE (Unity) __scrt_common_main_seh
    0x00007FF896043DC4 (KERNEL32) BaseThreadInitThunk
    0x00007FF898873691 (ntdll) RtlUserThreadStart

    ========== END OF STACKTRACE ===========

    It's super consistent.

    EDIT:
    Case # is 1128434.
     
    Last edited: Feb 18, 2019
  38. WizByteGames

    WizByteGames

    Joined:
    Mar 28, 2013
    Posts:
    32
    So I'm not sure if this has been reported, and I haven't seen it being reported. When pressing a button on the keyboard while a gamepad (In my case Xbox One Controller), or pressing a button on the gamepad the action only fires once, but if I unplug the gamepad and press a button on the keyboard the action fires as normal.
     
  39. EitanZ

    EitanZ

    Joined:
    Oct 11, 2016
    Posts:
    5
    Hello! I like the new input system a lot and I’m currently learning how to use it.
    My question is:
    Let’s say I have an action that binds to the right mouse button and to a gamepad’s left trigger button.
    It is for player aiming
    How can I get a boolean to update each frame and be true if one of the buttons is held/ pressed by the user?
     
  40. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    522
    Sorry for the lagginess on my end. Been moving. Quite the distraction...

    We have some wonkiness on 2019.1 that needs looking into. Could be this is part of it but not sure. I'll have a look.

    Could you tick the "Enable Diagnostics" option in the input debugger and give that a try? Sounds like events are erroneously getting rejected en masse. With diagnostics on, there should be a message in the log for every event that the system isn't happy with. Might shed some light as to what's going wrong here.

    We'll have a look. Filed a ticket here.

    We'll have a look. Filed a ticket here.

    Thanks for the report. Think I have an idea what's probably causing this.

    If you can live without HIDs for now (i.e. DualShock support as well as the generic HID fallback support), suppressing HIDs by constraining the set of devices in "Supported Devices" of the input settings *should* work around the problem I think.

    Sounds like the conflict resolution code is buggy and gets in a screwed up state. I'll have a look. Filed a ticket here.

    Can be done a couple different ways. One is something like

    Code (CSharp):
    1. myAction.performed += _ => m_Firing = true;
    2. myAction.cancelled += _ => m_Firing = false;
     
  41. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    546
    Take care with the moving!

    On this bug, I've only noticed it on my windows laptop, which has some built-in generic devices (touch screen, pen), whereas my windows desktop is much more stable. I'll plug in an HID device on my desktop and see if I can repro it there just to confirm, then I'll try what you suggested until a fix is available.
     
  42. Heimlink

    Heimlink

    Joined:
    Feb 17, 2015
    Posts:
    6
    Not sure if this is a bug, or if it's by design, however I'm unable to read values from a direct binding to a dpad in an Input Actions asset. However, if I create a 2D Vector binding, and assign each direction to the dpad buttons, I can read the values. This is happening in 0.2.0-preview.
     
  43. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    61
    Enable Diagnostics started throwing errors on 2019.1.0b3, but 2019.1.0b4 seems to have fixed everything!

    Thanks!
     
  44. hurleybird

    hurleybird

    Joined:
    Mar 4, 2013
    Posts:
    64
    So left and down don't seem to work for analog sticks on 0.2 and 2018.3.6. Right and up are fine.
     
  45. vecima

    vecima

    Joined:
    Jun 6, 2017
    Posts:
    4
    Hello,
    I've started trying to use the Input System and I've come across many errors.
    Input System preview 0.2.0
    I saw the following on 2018.3.0f2 and 2018.3.6f1

    Starting play mode two of these came up:
    During playing these errors eventually start being logged and seem to be thrown by every input, even when the editor is paused. I'm not 100% sure but it seems to be kicked off by either pressing a dpad input on my game pad (which should be mapped but doesn't seem to work) or by left clicking my mouse (which also should be mapped). After these start showing up they will be logged for every input (bad state?)
    Sometimes these three errors are logged. Often, but not always together.

     
    Heimlink likes this.
  46. co_visa

    co_visa

    Joined:
    Aug 6, 2018
    Posts:
    1
    Hi, what's the status and schedule with UIActionInputModule? Currently classes implementing both IPointerClickHandler and IEndDragHandler don't receive OnEndDrag at all if the dragging ends over the dragged component, all PointerEventDatas have their button set to InputButton.Left no matter which button was pressed, and IsPointerOverGameObject implementation is missing completely. Tested with Input System 0.2.0 on Unity 2019.2.0a4 and 2018.3.6f1 on Windows 10.
     
  47. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    546
  48. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    74
    Followed some tutorial on youtube and I'm getting a strange behaviour from the new input system.

    OK, here's some excerpt from a Player script:
    Code (csharp):
    1.  
    2. public class Player : MonoBehaviour
    3.     {
    4.         ...
    5.         [SerializeField] private InputAction movement;
    6.         ...
    7.  
    8.         private void Awake()
    9.         {
    10.             ...
    11.  
    12.             movement.performed += OnMovementChanged;
    13.             movement.cancelled += OnMovementChanged;
    14.         }
    15.  
    16.         private void OnMovementChanged(InputAction.CallbackContext context)
    17.         {
    18.             var direction = context.ReadValue<Vector2>();
    19.  
    20.             Direction = new Vector3(direction.x, 0, direction.y);
    21.         }
    22.  
    23. ...
    24.         private void OnDisable()
    25.         {
    26.             movement.Disable();
    27.         }
    28.  
    29.         private void OnEnable()
    30.         {
    31.             movement.Enable();
    32.         }
    33.     }
    34.  
    OK, so I've put a composite 2DVector for movement and used "zqsd" for the movement. But when I execute the scene I have to use "wasd" !?

    Debugging it, pushing on z and q does nothing but when I press a, it goes in OnMovementChanged but in context it says that q has been pressed...

    What the heck???
     
  49. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    546
  50. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    74
    Here it is.
     

    Attached Files: