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
- Component Glyphs value is truncated and Ligature Table glyph fields become inaccessible when increasing the Component Glyphs count
- There is no “Overwrite Preset?” popup when saving a Customizable Toolbar preset with a name that already exists
- Customizable Toolbar preset does not switch to the Unity Default Preset when Reverting All Saved Presets or deleting the active Preset
- New Hierarchy visibility and pickability icon behavior differs from documentation
- [Usability] Selected node gets unselected when undoing changes in the Graph Inspector Node Settings tab
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.