Class ShadowCaster2D
Class ShadowCaster2D
contains properties used for shadow casting
Implements
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.2D.Runtime.dll
Syntax
[CoreRPHelpURL("2DShadows", "com.unity.render-pipelines.universal")]
[ExecuteInEditMode]
[DisallowMultipleComponent]
[AddComponentMenu("Rendering/2D/Shadow Caster 2D")]
[MovedFrom(false, "UnityEngine.Experimental.Rendering.Universal", "com.unity.render-pipelines.universal", null)]
public class ShadowCaster2D : ShadowCasterGroup2D, ISerializationCallbackReceiver
Properties
alphaCutoff
The sets the renderer's shadow cutoff
Declaration
public float alphaCutoff { get; set; }
Property Value
Type | Description |
---|---|
float |
boundingSphere
The bounding sphere for the shadow caster
Declaration
public BoundingSphere boundingSphere { get; }
Property Value
Type | Description |
---|---|
BoundingSphere |
castingOption
Sets the type of shadow cast.
Declaration
public ShadowCaster2D.ShadowCastingOptions castingOption { get; set; }
Property Value
Type | Description |
---|---|
ShadowCaster2D.ShadowCastingOptions |
castsShadows
Specifies if shadows will be cast.
Declaration
public bool castsShadows { get; set; }
Property Value
Type | Description |
---|---|
bool |
mesh
The mesh to draw with.
Declaration
public Mesh mesh { get; }
Property Value
Type | Description |
---|---|
Mesh |
selfShadows
If true, the shadow casting shape is included as part of the shadow. If false, the shadow casting shape is excluded from the shadow.
Declaration
public bool selfShadows { get; set; }
Property Value
Type | Description |
---|---|
bool |
shapePath
The path for the shape.
Declaration
public Vector3[] shapePath { get; }
Property Value
Type | Description |
---|---|
Vector3[] |
trimEdge
The amount the shadow's edge is trimed
Declaration
public float trimEdge { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
OnDisable()
This function is called when the behaviour becomes disabled.
Declaration
protected void OnDisable()
OnEnable()
This function is called when the object becomes enabled and active.
Declaration
protected void OnEnable()
Update()
Update is called every frame, if the MonoBehaviour is enabled.
Declaration
public void Update()