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
public abstract class ShadowShape2DProvider
Methods
Disabled(Component)
Called for the active ShadowShape2DProvider when the ShadowCaster2D becomes disabled
Declaration
public virtual void Disabled(Component sourceComponent)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | sourceComponent | The component associated with the provider |
Enabled(Component)
Called for the active ShadowShape2DProvider when the ShadowCaster2D becomes enabled
Declaration
public virtual void Enabled(Component sourceComponent)
Parameters
| Type | Name | Description |
|---|---|---|
| Component | sourceComponent | The component associated with the provider |
IsShapeSource(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(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(Component, Bounds, ShadowShape2D)
Called before 2D lighting is rendered each frame
Declaration
public virtual void OnBeforeRender(Component sourceComponent, 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(Component, ShadowShape2D)
Called when the ShadowShape2DProvider is selected as the active Casting Option.
Declaration
public virtual void OnPersistantDataCreated(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 |