Class SpriteShapeGeometryCreator
Custom Post Processing after geometry is generated.
Inherited Members
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 |