No Input in WebGl Build

In my Game the move Input didn’t do anything in the webGL build. I modified my Code if the player, press it any move key the Sprite gets really big. (Works in Editor, but not in webGL). Also I have a second Input in the LogicScript to open the Shop-Menu with the “I”-Key. That is working fine, but my player didn’t react, with it move key’s.

I’m using only the new Input system.
The Player get’s spawned in while the logic script is there from the start

What I tried so far: I make sure Active Input Handling is set to both.
In the Player Prefab Input System, set mouse & keyboard, deactivated auto-switch*.
Tried with 3 different browsers on 2 different machines.

  public void PlayerMovement(InputAction.CallbackContext context) {

       if (context.performed) {
           transform.localScale = new Vector3(4,3,transform.localScale.z);
       }

*And I noticed something strange, if I set the Input Scheme to it works fine. But if I set it to “Mouse & Keyboard” it stops working, no input goes through. I also tried this with the standard player Inputs, it’s the same thing. Doesn’t work. Maybe that’s why it doesn’t work in Web?
Do I need to activate something?

1 Like

Hmm hard to say anything about this. It should work, I used new Input on the web with no issues a few months ago. Did you check for any Input System package updates? If so try those.

And check the browser console for any errors. Perhaps you simply have a Nullref in that script somewhere but you aren’t noticing it because the build is not a “development build” which would pop up an ingame console for every exception.

1 Like

@CodeSmile reply is sound: use all his tips at 1st.

The Only Difference that I know is that in WebGL you have 10 times bigger mouse sensitivity: it doesn’t matter which input system you use.

So in my Sensor Camera asset, I apply correction for Mouse Delta Values in WebGL.

I tried both of it, it’s all up-to-date and I didn’t see any error in the web console. I still couldn’t fix the problem. Maybe it has something to do with the input scheme? Inputs works with <any> Scheme, but no with keyboard&mouse