docs.unity.cn
    Show / Hide Table of Contents

    Class ShadowShape2D

    Class ShadowShape2D stores outline geometry for use with a shadow caster.

    Inheritance
    Object
    ShadowShape2D
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Rendering.Universal
    Syntax
    public abstract class ShadowShape2D

    Methods

    GetFlip(out Boolean, out Boolean)

    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
    Boolean flipX

    Returns flipping on the local x-axis

    Boolean flipY

    Returns flipping on the local y-axis

    SetDefaultTrim(Single)

    The value to initialize the trim when created

    Declaration
    public abstract void SetDefaultTrim(float trim)
    Parameters
    Type Name Description
    Single trim

    Specifies the starting trim value.

    SetFlip(Boolean, Boolean)

    SetFlip specifies how the shadow shape should be flipped when rendered

    Declaration
    public abstract void SetFlip(bool flipX, bool flipY)
    Parameters
    Type Name Description
    Boolean flipX

    Specifies flipping on the local x-axis

    Boolean flipY

    Specifies flipping on the local y-axis

    SetShape(NativeArray<Vector3>, NativeArray<Int32>, NativeArray<Single>, Matrix4x4, ShadowShape2D.WindingOrder, Boolean, Boolean)

    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 = ShadowShape2D.WindingOrder.Clockwise, bool allowContraction = true, bool createInteriorGeometry = false)
    Parameters
    Type Name Description
    NativeArray<Vector3> vertices

    The vertices used to create the shadow geometry.

    NativeArray<Int32> indices

    The indices used to create the shadow geometry (Lines topology)

    NativeArray<Single> 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.

    Boolean allowContraction

    Specifies if the ShadowCaster2D is allowed to contract the supplied shape(s).

    Boolean 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<Int32>, ShadowShape2D.OutlineTopology, ShadowShape2D.WindingOrder, Boolean, Boolean)

    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 = ShadowShape2D.WindingOrder.Clockwise, bool allowContraction = true, bool createInteriorGeometry = false)
    Parameters
    Type Name Description
    NativeArray<Vector3> vertices

    The vertices used to create the shadow geometry.

    NativeArray<Int32> 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.

    Boolean allowContraction

    Specifies if the ShadowCaster2D is allowed to contract the supplied shape(s).

    Boolean createInteriorGeometry

    Specifies if the ShadowCaster2D should create interior geometry. Required for shadow casters that do not use renderers as their source.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 08 September 2023