让GUI 随着屏幕尺寸变化而自动调整

From 呼吸的草稿本

Jump to: navigation, search

一句话搞定

定义基准屏幕尺寸 public Vector2 defaultScreenResolution = new Vector2(600,450);


设置调整

GUI.matrix = Matrix4x4.TRS (Vector3.zero, Quaternion.identity, new Vector3 (Screen.width / defaultScreenResolution.x, Screen.height / defaultScreenResolution.y, 1));

Personal tools