Search Issue Tracker
Fixed
Fixed in 1.11.1
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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
Resolution Note:
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