docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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

    Inheritance
    object
    ShadowShape2DProvider
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.Universal
    Assembly: Unity.RenderPipelines.Universal.2D.Runtime.dll
    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
    bool

    Returns true if sourceComponent is the data source of the ShadowShapeProvider.

    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 ShadowShape2D that is used by the ShadowCaster2D

    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 ShadowShape2D that is used by the ShadowCaster2D

    Priority()

    Gets the priority to be listed in the ShadowCaster2D Casting Option drop down.

    Declaration
    public virtual int Priority()
    Returns
    Type Description
    int

    The priority to be listed in the ShadowCaster2D Casting Option drop down.

    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 ShadowCaster2D Casting Option drop down.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)