Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Projector

A script interface for a projector component.
Read time 7 minutesLast updated 2 days ago

Definition

Warning
Deprecated. Projector component is deprecated now that the Built-In Render Pipeline is deprecated. To use an alternative, refer to the documentation in the component help icon. #from(6000.5)
public sealed class Projector : Behaviour

Remarks

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 Component.GetComponent to do it:
using UnityEngine;public class Example : MonoBehaviour{ void Start() { // Get the projector Projector proj = GetComponent<Projector>(); // Use it proj.nearClipPlane = 0.5f; }}
Additional Resources: projector component.

Properties

Property

Description

aspectRatioThe aspect ratio of the projection.
farClipPlaneThe far clipping plane distance.
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.
nearClipPlaneThe near clipping plane distance.
orthographicIs the projection orthographic (true) or perspective (false)?
orthographicSizeProjection's half-size when in orthographic mode.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.