0
\$\begingroup\$

I have a simple scene in my Unity 3d project. There is a Canvas (UI Scale Mode in Canvas Scaler is set to Constant Pixel Size but the same is with Scale with screen size), Panel inside it (Stretched to fill the Canvas) and a Button on the Top-Left corner. enter image description here
In Project Settings -> Player -> Resolution and Presentation -> Fullscreen Mode is set to Windowed. In editor this button works fine but when I build the game and make it maximized the hitbox of the button moves a bit lower than the button (The white rectangle is the button and as the green rectangle I draw the real hitbox of the button): enter image description here
I googled a lot, I tried it in different projects, I changed my UI a lot but nothing helps (only if I set Fullscreen window instead of Windowed but I don't need this).
I also found out that this happens only if I place elements near to the right side of my window, everywhere else all the buttons work fine.
I also found this thread about the similar problem to mine, but there is no solution. So how can I fix that? Thanks!

\$\endgroup\$
2
  • \$\begingroup\$ This looks like an unresolved bug in unity. Is Borderless Fullscreen Window acceptable? Maybe this will avoid the problem. \$\endgroup\$
    – Mangata
    Mar 3, 2023 at 3:10
  • \$\begingroup\$ @Mangata, Thanks for the comment! No, I can't use this type of window mode, because user wouldn't make the window back to the normal state. Maybe is there a way to make my own window header, but it seems like a not so good solution if it is even exist \$\endgroup\$ Mar 3, 2023 at 11:24

1 Answer 1

0
\$\begingroup\$

Finally, after some months I found the answer. I saw an Unity project and there was normal hitboxes of buttons and it was quite interesting. The version of the project was 2020.3.39f1 (version of mine was 2021.3.4f1). I didn't want to downgrade the version of my project so I tested version 2021.3.22f1. Everything was fine in the version. So as I understood, it was just a bug of the Unity version 2021.3.4f1.

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .