Search Issue Tracker
Fixed in 2022.2.0f1, 2023.1.0a3
[UI Toolkit] Mouse events not triggered in build when Active Input Handling is set to both
*Steps to repro:*
# download the attached project
# Make sure you can build a player (windowsstandalone)
# Hit play in the gameview and click and hover the label ( some logs will appear and clicks events are listed)
# now build a player and once its built, do the same
Events are not registered by clicking on the label.
- Adding a script with an empty OnGUI method seems to fixes the problem.
- Adding a standaloneinputmethod as a compoent on the UI Document fixes the problem.
*Notes (From Benoit):*
I'm pretty sure the problem comes from some optimization in our Build code that detects there's no GUI active in the game, and seeing that the new Input is also present (because you have "Both" selected) it probably discards the old input events. On the other hand UIToolkit detects that the old input also available and it tries to consume the GUI events, which aren't there.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Android] PointerEventData.pointerId value is incorrect when pressing a finger on the screen
- Standard Unity Materials and Shaders become corrupted after importing specific Asset Packages
- [Linux][OpenGL][Vulkan] Draw calls are not shown in the Event List when taking a capture of a frame with RenderDoc
- Inaccurate collision detections when Rigidbody Collision Detection is set to "Continuous" or "Continuous Dynamic"
- Crash on Object::IncrementPersistentDirtyIndex when upgrading project version