I’ve been working on Unity 5.1.4f1 for a while now and everything was working just fine.
I have two different projects that I’m in the middle of, both created in 5.1.4 and fully functioning in 5.1.4.
I saw that 5.2 was available recently and decided to update, but in doing so, it broke my UI scaling.
I then downgraded back to 5.1 to see if it was the update, and the scaling worked again, telling me it was the update.
A little more detail: My game is able to have its resolution changed from in-game based on player selection. In 5.1.4 and before, when the player changed the resolution, the window resized and the entire game adjusted appropriately and it looked fine.
But once I upgraded to 5.2 and built the game again with no changes at all to any code or any elements, the UI gets completely messed up when changing resolution.
Did something change in Unity 5.2 that could affect UI scaling? I didn’t touch anything between versions, so my only guess is that something changed in the engine and I don’t know about it. I’ve done some research and haven’t been able to find anyone else with this issue, and I didn’t see anything in the changelog that would relate to this.
This sounds identical to a bug that was affecting us in at least 5.2.0f3 and 5.2.1f1, but not anymore in 5.2.1p3.
Changing the resolution via an ingame menu resulted not in the expected resolution, but a weird zoom.
This was only occurring when using Screen.SetResolution using ingame code, but not with launcher settings.
If you cannot switch the Unity version (honestly, you should, we switched back to 5.1.4f1 because of several bugs), I found a “hack” solution before: SetResolution in full screen is a nightmare (Standalone Windows) - Questions & Answers - Unity Discussions
It simply kills your game and restarts the exe with the new resolution. But I’m definitely not recommending this.
That’s actually exactly what’s happening to me, the launcher settings are fine, but using Screen.SetResolution() misbehaves. I’m glad to see that I’m not the only one experiencing this.
It’s nice that there’s a workaround with that hack, but it’s definitely not something that I would want to resort to. I don’t really have a problem moving back to 5.1.4 if necessary, but 5.2 introduced a dropdown box built-in that would be really convenient for me. When you said you don’t experience this anymore in 5.2.1p3, does that mean this bug has been fixed? I had the most recent version of Unity installed earlier and was still experiencing it.
This looks like a bug. Did you submit a bug report? If you haven’t yet, don’t forget to mention that it is a regression and submit the project in which the issue happens. Regressions get higher priorities. Also, don’t forget to post the bug number here in case someone from Unity checks this thread.
I have not submitted a bug report yet. I noticed that I hadn’t installed the most recent patch that SanityIfOverrated mentioned, so I’m currently downloading and installing the patch. If it’s fixed in that patch like he stated, then I imagine we’re all good. If I’m still experiencing the same issues with the patch, then I will submit a patch a post the bug number here. Thank you for the advice.
EDIT:
After updating to the most recent patch 5.2.1p4, the UI scaling is no longer broken. I guess it was brought to their attention between releases and has been fixed. Thank you guys for the responses and information, this is no longer an issue.
Yes, I learned about the patch releases after your post and went to install one. I grabbed the most recent, 5.2.1p4, and that seems to have fixed the resolution issue, so thank you for bringing those to my attention.
As for your issues, that’s very strange and definitely something that the Unity team may have to look into. Maybe it’s something with your installation or your development environment?