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
- Inspector's custom tooltip is displayed incorrectly when the name is truncated in UI toolkit
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
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