Class VertexData
- Namespace
- TMPEffects.CharacterData
Holds data about a TextMeshPro character mesh.
public class VertexData
- Inheritance
-
VertexData
- Inherited Members
Constructors
VertexData(TMP_CharacterInfo)
public VertexData(TMP_CharacterInfo info)
Parameters
infoTMP_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
blTMP_VertextlTMP_VertextrTMP_VertexbrTMP_Vertex
Fields
initial
The initial, immutable vertex data of the character.
public readonly ReadOnlyVertexData initial
Field Value
Properties
BL_Alpha
Get or set the alpha of the bottom left vertex.
public byte BL_Alpha { get; set; }
Property Value
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
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
Modifiers
The modifiers of this mesh.
public TMPMeshModifiers Modifiers { get; }
Property Value
TL_Alpha
Get or set the alpha of the top left vertex.
public byte TL_Alpha { get; set; }
Property Value
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
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
colorsDirty
Whether the vertex colors have been manipulated.
public bool colorsDirty { get; }
Property Value
positionsDirty
Whether the positions have been manipulated.
public bool positionsDirty { get; }
Property Value
uvsDirty
Whether the UVs have been manipulated.
public bool uvsDirty { get; }
Property Value
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
iintThe index.
Returns
- byte
The alpha of the vertex associated with the index.
Exceptions
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
iintThe index.
Returns
- Color32
The color of the vertex associated with the index.
Exceptions
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
iintThe index.
Returns
- Vector3
The position of the vertex associated with the index.
Exceptions
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
iintThe index.
Returns
- Vector2
The UV0 of the vertex associated with the index.
Exceptions
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
iintThe index.
Returns
- Vector2
The UV2 of the vertex associated with the index.
Exceptions
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
Exceptions
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
iintThe index.
valueColor32The color to set the vertex too.
ignoreAlphaboolWhether to ignore the alpha of the passed in color.
Exceptions
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
iintThe index.
valueVector3
Exceptions
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
iintThe index.
valueVector2
Exceptions
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
iintThe index.
valueVector2