- Home /
getting the resolution of usser's pc
I have already tried Screen.currentResolution but still the program doesnt get the resolution of the user's pc . GUI messed up when transferring the game to other. I have tried changing it in the player settings and found out that it still follow it. is there a way that the resolution will be based on what you have set on the computer? thanks
Answer by VincentRodriguez · Mar 04, 2012 at 03:28 PM
Try to use
Screen.width
and
Screen.height
it gets width and height of the screen
whats the difference with Screen.width and Screen.currentresolution.width?
@berting01: see the docs for Screen.currentResolution: "If the player is running in window mode, this returns the current resolution of the desktop." Screen.width is the width of the Unity "screen", which might be a window.
Your answer
Follow this Question
Related Questions
print(Screen.currentResolution); not working 1 Answer
Screen.SetResolution causes screen to turn black (and other problems). Am I doing it right ? 1 Answer
Get the originial Screen resolution, after Screen.SetResolution in mobile? 0 Answers
how I can change the screen resolution in real time? 1 Answer