Get device screen resolution

Viewed 4714

I want to get device screen resolution in unity. I used Screen.currentResolution.height/width and Screen.height/width. On Samsung galaxy s6 they returned 1920:1080(must be 2560:1440). I tested on other devices and they all shows 1920:1080.

please tell me the right way to get the resolution.

Thank you.

2 Answers

Screen.height/width worked right, problem was with my phone

Try using the Display class Display.main.systemHeight and Display.main.systemWidth it works for both PC and mobile.

Related