Search Issue Tracker
By Design
Votes
0
Found in
2021.2.6f1
Issue ID
1392852
Regression
No
[UI] Button can only be partially clicked on the main game scene in a windows standalone build
Reproduction steps:
1) Open the localization test project.
2) Build and run a windows standalone build.
3) In the game, navigate to the game scene by clicking on the text buttons.
4) Click on the button on top of the main game scene.
Expected result: The button can be highlighted and clicked normally.
Actual result: The button can be highlighted and clicked on in certain small areas.
Reproducible in: 2019.4.32f1, 2020.3.23f1, 2021.2.6f1
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
- Redoing creation of Sub Scenes and Cube GameObjects in Hierarchy throws “Assertion failed on expression: 'targetScene != nullptr’” error in Console window
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
Resolution Note:
There are 2 canvases in the scene - UI and 1 for the cursor. They both have a sort order of 0. In the player they just happen to get sorted in a different order, its a common problem when sorting identical values, different platforms may do it differently or a change in initialization may happen to cause them to be added in a different order. I did not look into why this time it happens as the root problem is the same, they both have the same sort order.
So when the cursor canvas happens to be first the mouse raycaster selects the actual cursor and not the button behind it.
Do the following:
Disable raycast target on the mouse cursor so it cant select itself.
Change the UI canvas sort order to 1 so that its the same in the player and editor.