Thanuj
Thanuj

Reputation: 33

Screen.currentResolution with Unity 5.2.1

We are using Unity to develop a desktop application, and we were using Unity 4 previously. Now we have upgraded our project to Unity 5 (5.2.1). We have an issue with setting the screen resolution. We used Screen.SetResolution (Screen.currentResolution.width, Screen.currentResolution.height, true); in Unity 4 to set the resolution and it works fine, but in Unity 5, Screen.currentResolution.width doesn't give the correct value.

Is there anything new with Unity 5.2.1 that could cause this?

Upvotes: 2

Views: 2515

Answers (2)

user10175478
user10175478

Reputation:

I had the same problem and I just fixed it by using another way:

Screen.SetResolution(Display.main.systemWidth, Display.main.systemHeight, true);

It worked for me (the others didn't).

Upvotes: 0

Related Questions