Search Issue Tracker
Fixed
Fixed in 1.11.1, 7000.0.0
Votes
0
Found in [Package]
1.6.1
Issue ID
ISXB-1020
Regression
No
[WebGL] Input stops working when 2 Player Input Components are in the Scene
How to reproduce:
1. Open the attached Project "inputTest"
2. Build and Run the Scene "GameplayScene" on WebGL
3. Open the browser's Console
4. Focus the WebGL Player
5. Press the "A" key on the Keyboard
6. Observe the browser's Console
Expected result: "-1" and "0" can be seen logged in the Console
Actual result: Nothing is logged in the Console
Reproducible with: 1.6.1 (2021.3.28f1, 2022.3.4f1, 2023.1.3f1, 2023.2.0a23)
Reproduced on:
- Google Chrome (Version 114.0.5735.198)
Did not reproduce on:
- Unity Editor (MacOS Intel)
- Unity Player (MacOS Intel)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] [GameActivity] UI is unresponsive when Application Entry Point is set to GameActivity
- [Linux] VR template "Tutorial Player" GameObject becomes blank after entering Play mode
- Editor window minimizes when changing the Layout while using the Windows split-screen function
- Object pools do not reset when re-entering the Play Mode with reload domain disabled
- Performance issue when using Shadow-Casting Lights with Batch Renderer Groups
Resolution Note (fix version 7000.0.0):
Added message to notify the user if a PlayerInputComponent fails to bind a control scheme to help debug issues like this.
This can happen if there are multiple game objects with PlayerInputComponent's and not enough devices to support them
This issue isn't a WebGL specific issue.
Its due to the control scheme setup in the project.
The ControlScheme is setup to support both 'Keyboard&Mouse' or 'Touch'
On the PC setup there is only 'Keyboard&Mouse' present so its used for both the 'Player' and 'UIManager' gameObjects (which are both setup to use PlayerInputComponents with 'auto-switch' set on them).
On the WebGL setup there is Touch present too so this is auto assigned to one of the PlayerInputComponents, but there is no useful mapping set in the PlayerinputActions Input Action Asset to respond to the Touch (for UI/Move which responds to 'A' or for UI/Navigate which responds to 'A')
One solution is to delete the "Touch" control scheme from the PlayerinputActions
Resolution Note (fix version 1.11.1):
Added message to notify the user if a PlayerInputComponent fails to bind a control scheme to help debug issues like this.
This can happen if there are multiple game objects with PlayerInputComponent's and not enough devices to support them
This issue isn't a WebGL specific issue.
Its due to the control scheme setup in the project.
The ControlScheme is setup to support both 'Keyboard&Mouse' or 'Touch'
On the PC setup there is only 'Keyboard&Mouse' present so its used for both the 'Player' and 'UIManager' gameObjects (which are both setup to use PlayerInputComponents with 'auto-switch' set on them).
On the WebGL setup there is Touch present too so this is auto assigned to one of the PlayerInputComponents, but there is no useful mapping set in the PlayerinputActions Input Action Asset to respond to the Touch (for UI/Move which responds to 'A' or for UI/Navigate which responds to 'A')
One solution is to delete the "Touch" control scheme from the PlayerinputActions