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
- Errors and warnings are thrown after installing Visual Effect Graph Learning Samples
- Add Behaviour dropdown has a part in which the dropdown outline is cut out when the Add Behaviour dropdown is opened
- Empty gap next to Preview window in SpeedTree Shader Graph Nodes
- Override move options in Inspector are not disabled when only one Override is added in URP Volume
- “NONE”/“ALL” text in Adaptive Probe Volumes Option Override is too light when Editor theme is set to Light
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