Search Unity

Errors on the first try :(

Discussion in 'Input System' started by Celes_Eternal, Jun 3, 2018.

  1. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18
    Hello guys,
    I'm trying to organize a new project with ECS and the input system preview. But when I installed everything for the input system (modified the manifest, copy past the folder, using the beta engine ...). And started the editor, I just got welcome by this error:

    Did I forgot something? Or my mouse isn't supported? Oo
    Btw the input system is still under active development? The forum is quite quiet.
     
  2. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18
    I tried again with a fresh project, and the input system works fine alone. But if I download ECS preview, I got the error :(
     
  3. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    Did you enable the new input system under the hood?

    It's a oft-overlooked step, but you have to turn it on in Player Settings -> Configuration -> Active Input Handling*. If it's set to Input Manager it won't be able to create any input devices on the native side. You'll have to set it either to Input System (preview) or Both. PlayerSettingsConfiguration.png

    Does that help?
     
  4. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18
    Yeah I did it, it works fine if I don't try to use ECS preview.
    I'm wondering, do you have any problem to make both of them working at the same time?
    Or it's just me
     
  5. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    I'll try to get back to them tonight and check. I've been taking care of other parts of my project and haven't run my previous tests in a while.

    I didn't have any issue with a generic Logitech mouse and Xbox/ps4 pads though.
     
  6. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Buggy/incomplete HID support striking again. However, other than having an annoying exception in the log, you should be able to otherwise use the system just fine.

    We do not pick up mouse input directly through the HID interface. Given that the OS will usually end up claiming any mouse HID for exclusive access, my guess is this is an alternate HID interface on the mouse. The actual mouse input should come through on the Mouse device just fine.

    What happens here is that we don't specifically recognize the device so we fall back to a path that tries to make sense of the device just by looking at the HID description it supplies us with. Unfortunately, that path still has problems and can produce erroneous output which then produces exceptions like the above. However, the system will simply skip the device and go on.
     
  7. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18

    I may be wrong, but it seems to me that it shouldn't work even when I don't use ECS preview then?
     
  8. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    It should start up fine. If you pop open the input debugger (Window >> Input Debugger), the devices other than the one that causes the exception should be there -- including a Mouse device. And overall, things should work fine.

    Think I just realized what the bug in the HID code is. Are you in a locale that uses comma as the decimal separator? I.e. 1,234 instead of 1.234.
     
  9. Celes_Eternal

    Celes_Eternal

    Joined:
    May 18, 2018
    Posts:
    18
    But it's the only device that I have, so that's not really easy x)
    And yes, seems like my local is still on French. We're using comma as a separator.
     
  10. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Judging from the exception dump, you're on Windows. You should have at least a Keyboard and Mouse device added by the system. These are always added by the native input backend on Windows and are not going through the Windows HID API.

    Thanks. We'll fix the locale-dependency in the HID code which should get rid of the error you're seeing. I've filed a ticket here: https://github.com/Unity-Technologies/InputSystem/issues/134
     
    Celes_Eternal likes this.
  11. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779