Class ShadowCaster2D
Class ShadowCaster2D
contains properties used for shadow casting
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
Namespace: UnityEngine.Rendering.Universal
Syntax
[ExecuteInEditMode]
[DisallowMultipleComponent]
[AddComponentMenu("Rendering/2D/Shadow Caster 2D")]
[MovedFrom("UnityEngine.Experimental.Rendering.Universal")]
public class ShadowCaster2D : ShadowCasterGroup2D, ISerializationCallbackReceiver
Properties
castsShadows
Specifies if shadows will be cast.
Declaration
public bool castsShadows { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
mesh
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 |
---|---|
Boolean |
shapePath
Declaration
public Vector3[] shapePath { get; }
Property Value
Type | Description |
---|---|
Vector3[] |
useRendererSilhouette
If selfShadows is true, useRendererSilhoutte specifies that the renderer's sihouette should be considered part of the shadow. If selfShadows is false, useRendererSilhoutte specifies that the renderer's sihouette should be excluded from the shadow
Declaration
public bool useRendererSilhouette { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
Implements
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()
Implements
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()
Update()
Declaration
public void Update()