docs.unity3d.com
    Show / Hide Table of Contents

    Class SpriteShapeGeometryCreator

    Custom Post Processing after geometry is generated.

    Inheritance
    Object
    Object
    ScriptableObject
    SpriteShapeGeometryCreator
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.U2D
    Syntax
    public abstract class SpriteShapeGeometryCreator : ScriptableObject

    Methods

    GetVertexArrayCount(SpriteShapeController)

    Get size of the vertices to be allocated for the Job. This is also used to determine the number of indices needed. Current implementaiton only allows 1 vertex to be mapped to 1 index thus the index array will have the same length as the vertex array.

    Declaration
    public abstract int GetVertexArrayCount(SpriteShapeController spriteShapeController)
    Parameters
    Type Name Description
    SpriteShapeController spriteShapeController

    SpriteShapeController of the GameObject.

    Returns
    Type Description
    Int32

    MakeCreatorJob(SpriteShapeController, NativeArray<UInt16>, NativeSlice<Vector3>, NativeSlice<Vector2>, NativeSlice<Vector4>, NativeArray<SpriteShapeSegment>, NativeArray<float2>)

    Create SpriteShape Geometry.

    Declaration
    public abstract JobHandle MakeCreatorJob(SpriteShapeController spriteShapeController, NativeArray<ushort> indices, NativeSlice<Vector3> positions, NativeSlice<Vector2> texCoords, NativeSlice<Vector4> tangents, NativeArray<SpriteShapeSegment> segments, NativeArray<float2> colliderData)
    Parameters
    Type Name Description
    SpriteShapeController spriteShapeController

    SpriteShapeController of the GameObject.

    NativeArray<UInt16> indices

    Indices of generated geometry. Initialize to max Array count and contains default data.

    NativeSlice<Vector3> positions

    Position of vertices in generated geometry. Initialize to max Array count and contains default data.

    NativeSlice<Vector2> texCoords

    Texture Coordinates of vertices in generated geometry. Initialize to max Array count and contains default data.

    NativeSlice<Vector4> tangents

    Tangent of vertices in generated geometry. Initialize to max Array count and contains default data.

    NativeArray<SpriteShapeSegment> segments

    Submeshes in generated geometry. Initialize to max Array count and contains default data.

    NativeArray<float2> colliderData

    Points that define the path of Collider.

    Returns
    Type Description
    JobHandle
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023