Table of Contents

Class VertexData

Namespace
TMPEffects.CharacterData
Assembly
TMPEffects.dll

Holds data about a character's mesh.

public class VertexData
Inheritance
VertexData
Inherited Members

Constructors

VertexData(TMP_CharacterInfo)

public VertexData(TMP_CharacterInfo info)

Parameters

info TMP_CharacterInfo

VertexData(TMP_Vertex, TMP_Vertex, TMP_Vertex, TMP_Vertex)

public VertexData(TMP_Vertex bl, TMP_Vertex tl, TMP_Vertex tr, TMP_Vertex br)

Parameters

bl TMP_Vertex
tl TMP_Vertex
tr TMP_Vertex
br TMP_Vertex

Fields

initial

The initial vertex of the character.

public readonly ReadOnlyVertexData initial

Field Value

ReadOnlyVertexData

Properties

BL_Alpha

Get or set the alpha of the bottom left vertex.

public byte BL_Alpha { get; set; }

Property Value

byte

BL_Color

Get or set the color of the bottom left vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.

public Color32 BL_Color { get; set; }

Property Value

Color32

BL_Position

Get or set the position of the bottom left vertex.

public Vector3 BL_Position { get; set; }

Property Value

Vector3

BL_UV0

Get or set the UV0 of the bottom left vertex.

public Vector3 BL_UV0 { get; set; }

Property Value

Vector3

BL_UV2

Get or set the UV2 of the bottom left vertex.

public Vector3 BL_UV2 { get; set; }

Property Value

Vector3

BR_Alpha

Get or set the alpha of the bottom right vertex.

public byte BR_Alpha { get; set; }

Property Value

byte

BR_Color

Get or set the color of the bottom right vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.

public Color32 BR_Color { get; set; }

Property Value

Color32

BR_Position

Get or set the position of the bottom right vertex.

public Vector3 BR_Position { get; set; }

Property Value

Vector3

BR_UV0

Get or set the UV0 of the bottom right vertex.

public Vector3 BR_UV0 { get; set; }

Property Value

Vector3

BR_UV2

Get or set the UV2 of the bottom right vertex.

public Vector3 BR_UV2 { get; set; }

Property Value

Vector3

TL_Alpha

Get or set the alpha of the top left vertex.

public byte TL_Alpha { get; set; }

Property Value

byte

TL_Color

Get or set the color of the top left vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.

public Color32 TL_Color { get; set; }

Property Value

Color32

TL_Position

Get or set the position of the top left vertex.

public Vector3 TL_Position { get; set; }

Property Value

Vector3

TL_UV0

Get or set the UV0 of the bottom right vertex.

public Vector3 TL_UV0 { get; set; }

Property Value

Vector3

TL_UV2

Get or set the UV2 of the bottom right vertex.

public Vector3 TL_UV2 { get; set; }

Property Value

Vector3

TR_Alpha

Get or set the alpha of the top right vertex.

public byte TR_Alpha { get; set; }

Property Value

byte

TR_Color

Get or set the color of the top right vertex.
Note that this will mark both colors and alphas as dirty.
Use SetColor(int, Color32, bool) if you want to only set color.

public Color32 TR_Color { get; set; }

Property Value

Color32

TR_Position

Get or set the position of the top right vertex.

public Vector3 TR_Position { get; set; }

Property Value

Vector3

TR_UV0

Get or set the UV0 of the top right vertex.

public Vector3 TR_UV0 { get; set; }

Property Value

Vector3

TR_UV2

Get or set the UV2 of the top right vertex.

public Vector3 TR_UV2 { get; set; }

Property Value

Vector3

alphasDirty

Whether the vertex alphas have been manipulated.

public bool alphasDirty { get; }

Property Value

bool

colorsDirty

Whether the vertex colors have been manipulated.

public bool colorsDirty { get; }

Property Value

bool

positionsDirty

Whether the positions have been manipulated.

public bool positionsDirty { get; }

Property Value

bool

uvsDirty

Whether the UVs have been manipulated.

public bool uvsDirty { get; }

Property Value

bool

Methods

GetAlpha(int)

Get the alpha of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public byte GetAlpha(int i)

Parameters

i int

The index.

Returns

byte

The alpha of the vertex associated with the index.

Exceptions

ArgumentOutOfRangeException

GetColor(int)

Get the color of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public Color32 GetColor(int i)

Parameters

i int

The index.

Returns

Color32

The color of the vertex associated with the index.

Exceptions

ArgumentOutOfRangeException

GetPosition(int)

Get the position of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public Vector3 GetPosition(int i)

Parameters

i int

The index.

Returns

Vector3

The position of the vertex associated with the index.

Exceptions

ArgumentOutOfRangeException

GetUV0(int)

Get the UV0 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public Vector2 GetUV0(int i)

Parameters

i int

The index.

Returns

Vector2

The UV0 of the vertex associated with the index.

Exceptions

ArgumentOutOfRangeException

GetUV2(int)

Get the UV2 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public Vector2 GetUV2(int i)

Parameters

i int

The index.

Returns

Vector2

The UV2 of the vertex associated with the index.

Exceptions

ArgumentOutOfRangeException

Reset()

Reset the mesh to initial.

public void Reset()

ResetAlphas()

public void ResetAlphas()

ResetColors()

Reset the vertex colors to initial.

public void ResetColors()

ResetPositions()

Reset the vertices to initial.

public void ResetPositions()

ResetUVs()

Reset the UVs to initial.

public void ResetUVs()

SetAlpha(int, float)

Set the alpha of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public void SetAlpha(int i, float value)

Parameters

i int

The index.

value float

Exceptions

ArgumentOutOfRangeException

SetColor(int, Color32, bool)

Set the color of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public void SetColor(int i, Color32 value, bool ignoreAlpha = false)

Parameters

i int

The index.

value Color32

The color to set the vertex too.

ignoreAlpha bool

Whether to ignore the alpha of the passed in color.

Exceptions

ArgumentOutOfRangeException

SetPosition(int, Vector3)

Set the position of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public void SetPosition(int i, Vector3 value)

Parameters

i int

The index.

value Vector3

Exceptions

ArgumentOutOfRangeException

SetUV0(int, Vector2)

Set the UV0 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public void SetUV0(int i, Vector2 value)

Parameters

i int

The index.

value Vector2

Exceptions

ArgumentOutOfRangeException

SetUV2(int, Vector2)

Set the UV2 of the vertex associated with the index.
0 => bottom left
1 => top left
2 => top right
3 => bottom right

public void SetUV2(int i, Vector2 value)

Parameters

i int

The index.

value Vector2

Exceptions

ArgumentOutOfRangeException