docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetShape

    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.

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