How to get monitor/display resolution

给你一囗甜甜゛ 提交于 2019-12-05 23:02:02

Looks like i found solution. @Draco18s pointed to Screen class but what i'm looking for is called Display. Display class allows me to get native size of monitor or display in pixels. Looks like "Screen" class is used only for game window/full screen but for display as hardware device is used "Display" class. It was added to Unity3d very recently with multi-display support, this is reason why very few people knows about its existence.

To be more specific i was looking for Display.main.systemHeight and Display.main.systemWidth

The Screen class is what you are looking for.

Particularly Screen.width and Screen.height.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!