Inherits from Behaviour
A script interface for a projector component.
用于投影器组件的一个脚本接口。
The Projector can be used to project any material onto the scene - just like a real world projector. The properties exposed by this class are an exact match for the values in the Projector's inspector.
Projector可以投射任意材质到场景上- 就像真实世界的投影仪。这个类属性暴露完全匹配用于在Projector的检视面板的值。
It can be used to implement blob or projected shadows. You could also project an animated texture or a render texture that films another part of the scene. The projector will render all objects in its view frustum with the provided material.
它可以用来实现blob或投射阴影。你也可以投射纹理动画或渲染纹理在电影场景的另一部分。投影机将渲染它视锥里的所有物体和提供
的材质。There is no shortcut property in GameObject or Component to access the Projector, so you must use GetComponent to do it:
在GameObject或Component访问Projector没有快捷属性,所以你必须使用GetComponent来做:
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Start() {
Projector proj = GetComponent<Projector>();
proj.nearClipPlane = 0.5F;
}
}
function Start() {
// Get the projector
//获得投影器
var proj : Projector = GetComponent (Projector);
// Use it 使用它
proj.nearClipPlane = 0.5;
}