Class ShadowShape2D
Class ShadowShape2D
stores outline geometry for use with a shadow caster.
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.2D.Runtime.dll
Syntax
public abstract class ShadowShape2D
Methods
GetFlip(out bool, out bool)
GetFlip returns how the shadow shape should be flipped when rendered
Declaration
public abstract void GetFlip(out bool flipX, out bool flipY)
Parameters
Type | Name | Description |
---|---|---|
bool | flipX | Returns flipping on the local x-axis |
bool | flipY | Returns flipping on the local y-axis |
SetDefaultTrim(float)
The value to initialize the trim when created
Declaration
public abstract void SetDefaultTrim(float trim)
Parameters
Type | Name | Description |
---|---|---|
float | trim | Specifies the starting trim value. |
SetFlip(bool, bool)
SetFlip specifies how the shadow shape should be flipped when rendered
Declaration
public abstract void SetFlip(bool flipX, bool flipY)
Parameters
Type | Name | Description |
---|---|---|
bool | flipX | Specifies flipping on the local x-axis |
bool | flipY | Specifies flipping on the local y-axis |
SetShape(NativeArray<Vector3>, NativeArray<int>, NativeArray<float>, Matrix4x4, WindingOrder, bool, bool)
SetShape creates shadow geometry using the supplied geometry
Declaration
public abstract void SetShape(NativeArray<Vector3> vertices, NativeArray<int> indices, NativeArray<float> radii, Matrix4x4 transform, ShadowShape2D.WindingOrder windingOrder = WindingOrder.Clockwise, bool allowContraction = true, bool createInteriorGeometry = false)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<Vector3> | vertices | The vertices used to create the shadow geometry. |
NativeArray<int> | indices | The indices used to create the shadow geometry (Lines topology) |
NativeArray<float> | radii | The radius at the vertex. Can be used to describe a capsule. |
Matrix4x4 | transform | The transform used to create the shadow geometry. |
ShadowShape2D.WindingOrder | windingOrder | The winding order of the supplied geometry. |
bool | allowContraction | Specifies if the ShadowCaster2D is allowed to contract the supplied shape(s). |
bool | createInteriorGeometry | Specifies if the ShadowCaster2D should create interior geometry. Required for shadow casters that do not use renderers as their source. |
SetShape(NativeArray<Vector3>, NativeArray<int>, OutlineTopology, WindingOrder, bool, bool)
SetShape creates shadow geometry using the supplied geometry
Declaration
public abstract void SetShape(NativeArray<Vector3> vertices, NativeArray<int> indices, ShadowShape2D.OutlineTopology outlineTopology, ShadowShape2D.WindingOrder windingOrder = WindingOrder.Clockwise, bool allowContraction = true, bool createInteriorGeometry = false)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<Vector3> | vertices | The vertices used to create the shadow geometry. |
NativeArray<int> | indices | The indices used to create the shadow geometry (Lines topology) |
ShadowShape2D.OutlineTopology | outlineTopology | The settings to create the renderer with. |
ShadowShape2D.WindingOrder | windingOrder | The winding order of the supplied geometry. |
bool | allowContraction | Specifies if the ShadowCaster2D is allowed to contract the supplied shape(s). |
bool | createInteriorGeometry | Specifies if the ShadowCaster2D should create interior geometry. Required for shadow casters that do not use renderers as their source. |