Class ShadowShape2DProvider
Class ShadowShape2DProvider
has methods called by a ShadowCaster2D
to determine if it should be listed as a Casting Option, and to provide geometry if it is the active ShadowShape2DProvider
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Syntax
[Serializable]
public abstract class ShadowShape2DProvider
Methods
Disabled(in Component)
Called for the active ShadowShape2DProvider
when the ShadowCaster2D
becomes disabled
Declaration
public virtual void Disabled(in Component sourceComponent)
Parameters
Type | Name | Description |
---|---|---|
Component | sourceComponent | The component associated with the provider |
Enabled(in Component)
Called for the active ShadowShape2DProvider
when the ShadowCaster2D
becomes enabled
Declaration
public virtual void Enabled(in Component sourceComponent)
Parameters
Type | Name | Description |
---|---|---|
Component | sourceComponent | The component associated with the provider |
IsShapeSource(in Component)
Called for each component on a ShadowCaster2D's
GameObject
. Returns true if the provided component is the data source of the ShadowShapeProvider
.
Declaration
public abstract bool IsShapeSource(in Component sourceComponent)
Parameters
Type | Name | Description |
---|---|---|
Component | sourceComponent | The component to test as a source |
Returns
Type | Description |
---|---|
Boolean | Returns true if sourceComponent is the data source of the |
OnBeforeRender(in Component, in Bounds, ShadowShape2D)
Called before 2D lighting is rendered each frame
Declaration
public abstract void OnBeforeRender(in Component sourceComponent, in Bounds worldCullingBounds, ShadowShape2D persistantShadowShape)
Parameters
Type | Name | Description |
---|---|---|
Component | sourceComponent | The component associated with the provider |
Bounds | worldCullingBounds | The bounds enclosing the region of the view frustum and all visible lights |
ShadowShape2D | persistantShadowShape | An instance of |
OnPersistantDataCreated(in Component, ShadowShape2D)
Called when the ShadowShape2DProvider
is selected as the active Casting Option.
Declaration
public abstract void OnPersistantDataCreated(in Component sourceComponent, ShadowShape2D persistantShadowShape)
Parameters
Type | Name | Description |
---|---|---|
Component | sourceComponent | The component associated with the provider |
ShadowShape2D | persistantShadowShape | An instance of |
Priority()
Gets the priority to be listed in the ShadowCaster2D
Casting Option drop down.
Declaration
public virtual int Priority()
Returns
Type | Description |
---|---|
Int32 | The priority to be listed in the |
ProviderName(String)
Gets the name to be listed in the ShadowCaster2D
Casting Option drop down.
Declaration
public virtual string ProviderName(string componentName)
Parameters
Type | Name | Description |
---|---|---|
String | componentName | The name of component associated with the provider. |
Returns
Type | Description |
---|---|
String | The string to be listed in the |