This is my code
Screen.SetResolution(1920,1080,false);
This doesnt resize the window to 1920x1080 and in VS Logs i see that ApplicationView.TryResizeView(1920,1080) returned false.
I checked to figure out that this resolution works in fullscreen mode but not in window mode, because in window mode this reolution (1920x1080) is larger than what windows allows on a 1920x1080 screen. So the window is automatically resized to a smaller value, in my case 1600x900.
What i want to do is to let the user know that the resolution they selected will not work and the game has been resized to another resolution.
To do that i checked the values of Screen.width and Screen.height after i call Screen.SetResolution. but it returned 1920x1080.
If i check values of Screen.width and Screen.height after 3 seconds then it returns correctly 1600x900.
So i figured out that only after ApplicationView.TryResizeView(1920,1080) has returned false do i get the correct values (1600x900).
But i cant just put a delay of 3 secs, i dont know how long ApplicationView.TryResizeView() is going to take.
Is there a way that i can put a callback in MainPage.xaml.cs to let me know when ApplicationView.TryResizeView() has finished?
Or is there a way through unity only to check that?