Projector.aspectRatio 宽高比
var aspectRatio : float
Description描述
The aspect ratio of the projection.
投影的宽高比。
This is projection width divided by height. An aspect ratio of 1.0 makes the projection square; a ratio of 2.0 makes it twice as wide than high.
这个是投影的宽度除以高度。比为1.0这个投影为正方形:比为2.0则宽为高的2倍。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Start() {
Projector proj = GetComponent<Projector>();
proj.aspectRatio = 2.0F;
}
}
function Start() {
var proj : Projector = GetComponent(Projector);
proj.aspectRatio = 2.0;
}
最后修改:2011年3月19日 Saturday 14:46