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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.