Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug New input system does not work in WebGL 2021.2.0b1

Discussion in '2021.2 Beta' started by DrViJ, Jul 1, 2021.

  1. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
    repro:
    1) I've installed Input system Version 1.1.0-pre.5 - May 14, 2021
    2) Imported touch examples
    3) Built it for webgl

    The ui menu in this build build does not react on input. Mouse and keyboard do not work. Tested on Safary and Chrome
     
    Last edited: Jul 1, 2021
  2. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
    Found some details. the scene with menu does not crash, but menu does not work.

    The scene with drawing example crashes

    Screenshot 2021-07-02 at 00.40.36.png
     
  3. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
    The crash was cause of

    Code (CSharp):
    1.         [RuntimeInitializeOnLoadMethod]
    2.         private static void Register()
    3.         {
    4.             InputSystem.RegisterBindingComposite<PointerInputComposite>();
    5.         }
    Changed to

    Code (CSharp):
    1.         [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    2.         private static void Register()
    3.         {
    4.             InputSystem.RegisterBindingComposite<PointerInputComposite>();
    5.         }
    This fixed the crash, but input does not work at all

    I reported bug. Maybe I can tag somebody from Unity?
     
    Last edited: Jul 1, 2021
  4. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
     
    mahdi_jeddi likes this.
  5. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
    Important notice:
    It works in 2021.1 and does not in 2021.2.0b2
     
  6. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    317
    Have the same issue,

    Reported it case 1348343.

    @LeonhardP, can you confirm if this issue has been raised properly? Makes it impossible to deploy WebGL with the new input system.
     
    DrViJ likes this.
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
    Thanks for the bug reports. We have received them and will investigate.
     
    KamilCSPS and DrViJ like this.
  8. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
    I missed to tell, my case is (Case 1347300) for the input and (Case 1347311) for the exception in Touch examples. Thank you @LeonhardP, lets make unity strong :)
     
    LeonhardP likes this.
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
     
    DrViJ and KamilCSPS like this.
  10. xuan_celestial

    xuan_celestial

    Joined:
    Jul 17, 2018
    Posts:
    18
    In the latest Unity 2021.2.0b4, Project without 'Input system Version 1.1.0-pre.5 - May 14, 2021', the input also wont work when building for WebGL

    Things in scene:
    1. simple button that call Debug.Log()

    Expected:
    Browser console show console.log, but it didn't.
     
    DrViJ likes this.
  11. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
  12. jiadongchen

    jiadongchen

    Joined:
    Dec 16, 2020
    Posts:
    3
  13. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    317
  14. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
  15. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    317
    @LeonhardP,

    Related to this, as per the comments above; issue 1347311 is still ongoing in b7.

    Do you have some insight on when it might land?
     
  16. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
    The fix for this issue is in landing pattern for our main development branch right now (22.1). Once it has landed, it can get backported to 2021.2. I wouldn't expect it to land before b10.
     
    Last edited: Aug 19, 2021
    KamilCSPS and DrViJ like this.
  17. DrViJ

    DrViJ

    Joined:
    Feb 9, 2013
    Posts:
    153
    Thanks for keeping in touch!
     
    LeonhardP likes this.
  18. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,065
    Unfortunately the fix won't be in b10. I'll update the thread once I know when it landed.
     
    DrViJ likes this.
  19. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    255
    Using b15 and there are no errors and yet the mouse is not working while the keyboard does.
     
  20. atomikm

    atomikm

    Joined:
    Feb 8, 2020
    Posts:
    19
    Having this same issue, keyboard works but mouse doesn't. Using Unity 2021.2.15f1
     
  21. atomikm

    atomikm

    Joined:
    Feb 8, 2020
    Posts:
    19
    For anyone running into this issue, I no longer have the issue when building with Unity 2021.3.8f1
     
  22. pkcooper

    pkcooper

    Joined:
    Dec 12, 2022
    Posts:
    2
    I am having this issue with 2021.3.15f