Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Wrong DisplayStrings/ControlPaths in WebGL Build

Discussion in 'Input System' started by Lupeni, Mar 23, 2022.

  1. Lupeni

    Lupeni

    Joined:
    Aug 13, 2017
    Posts:
    5
    Hi everyone,
    I've recently created an UI system that basically reads through actionMaps and displays an UI that describes it.
    One feature that I use to make sure that the appropriate sprite/text is displayed is using controlPaths because they are "Universals" (because of US/EU Keyboards, different controllers etc...) and THEN turning them into BindingDiplayStrings to display on the UI.

    Now, this is the place where i get all of my infos.
    upload_2022-3-23_14-45-4.png

    For things like a WASD binding, the editor logs :

    upload_2022-3-23_14-34-59.png
    (I have a EU keyboard so everything works as expected)

    BUT during a WEBGL build :
    upload_2022-3-23_14-36-39.png


    Another strange thing is that I tried to log all keys in the keyboard and this time too, I get different logs depending of if i'm in the editor or in a build :

    Exemple :
    upload_2022-3-23_14-50-48.png

    Log in editor : A is Q at path /Keyboard/a
    Log in Build : A is A at path /Keyboard/a

    Why things are different there? Maybe it's just a bug or maybe because it is webgl the current layout is unknown but I highly doubt it because the bindings work great (On a EU keyboard W is Z, A is Q, S is S and D is D)

    Thank's for everyone that will try to help.
     

    Attached Files: