Projector 投影器

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:

GameObjectComponent访问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;
}

Variables变量

Inherited members继承成员

Inherited Variables继承变量

Inherited Functions继承函数

Inherited Class Functions继承类函数

最后修改:2011年3月19日 Saturday 16:08

本脚本参考基于Unity 3.4.1f5

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