Camera.pixelHeight 相机高度

var pixelHeight : float

Description描述

How tall is the camera in pixels (Read Only).

相机有多高,以像素单位(只读)。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		print("Camera is " + camera.pixelWidth + " pixels wide");
	}
}
print ("Camera is " + camera.pixelWidth + " pixels wide");
最后修改:2011年3月6日 Sunday 20:34

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。