Unity如何获取屏幕高度和宽度?

时间:2020-07-03 07:01:49

标签: unity3d

enter image description here

enter image description here

Debug.LogFormat("Screen.width {0} , Screen.height {1}", Screen.width, Screen.height);

我使用Screen.height&Screen.wdith,但是我在控制台上打印它,看起来很奇怪,发生了什么事?

我也尝试过Screen.currentResolution,但是它总是返回'1920'?

 Debug.LogFormat("Screen.currentResolution.width {0} ", Screen.currentResolution.width);

0 个答案:

没有答案