Version: 2017.3

Projector

class in UnityEngine

/

Inherits from:Behaviour

Switch to Manual

Description

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.

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.

There is no shortcut property in GameObject or Component to access the Projector, so you must use GetComponent to do it:

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Start() { Projector proj = GetComponent<Projector>(); proj.nearClipPlane = 0.5F; } }

See Also: projector component.

Variables

aspectRatioThe aspect ratio of the projection.
farClipPlaneРасстояние дальней плоскости отсечения.
fieldOfViewThe field of view of the projection in degrees.
ignoreLayersWhich object layers are ignored by the projector.
materialThe material that will be projected onto every object.
nearClipPlaneДистанция ближней плоскости отсечения.
orthographicIs the projection orthographic (true) or perspective (false)?
orthographicSizeProjection's half-size when in orthographic mode.

Inherited members

Variables

enabledВключенное Поведение обновляется, выключенное Поведение не обновляется.
isActiveAndEnabledHas the Behaviour had enabled called.
gameObjectИгровой объект к которому прикреплён данный компонент. Компонент всегда прикреплён к игровому объекту.
tagТег данного игрового объекта.
transformThe Transform attached to this GameObject.
hideFlagsShould the object be hidden, saved with the scene or modifiable by the user?
nameThe name of the object.

Public Functions

BroadcastMessageВызывает метод названный methodName на каждом MonoBehaviour этого game object-а или любого из его потомков.
CompareTagПомечен ли данный игровой объект тегом tag?
GetComponentВозвращает компонент типа type, если он прикреплен к игровому объекту и null, если не прикреплен.
GetComponentInChildrenВозвращает компонент типа type в GameObject или некоторого его потомка через поиск в глубину.
GetComponentInParentВозвращает все компоненты типа type из GameObject'а или из любого его родителя.
GetComponentsВозвращает все компоненты типа type в GameObject.
GetComponentsInChildrenВозвращает все компоненты типа type в GameObject или любому из его потомков.
GetComponentsInParentВозвращает все компоненты типа type в GameObject или любому из его родителей.
SendMessageВызывает метод с названием methodName в каждом MonoBehaviour в этом игровом объекте.
SendMessageUpwardsВызывает метод с именем methodName в каждом MonoBehaviour в этом игровом объекте и в каждом предке поведения.
GetInstanceIDReturns the instance id of the object.
ToStringReturns the name of the GameObject.

Static Functions

DestroyУдаляет GameObject, Component или Asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadMakes the object target not be destroyed automatically when loading a new scene.
FindObjectOfTypeReturns the first active loaded object of Type type.
FindObjectsOfTypeReturns a list of all active loaded objects of Type type.
InstantiateClones the object original and returns the clone.

Operators

boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.