Table of Contents

Class CharData

Namespace
TMPEffects.CharacterData
Assembly
TMPEffects.dll

Holds information about a character.
In addition to holding a selection of data supplied by the respective TMPro.TMP_CharacterInfo, accessible through the info field, also holds TMPEffects specific data and methods to manipulate said data.

public class CharData
Inheritance
CharData
Inherited Members

Constructors

CharData(int, TMP_CharacterInfo, int)

public CharData(int index, TMP_CharacterInfo cInfo, int wordIndex)

Parameters

index int
cInfo TMP_CharacterInfo
wordIndex int

CharData(int, TMP_CharacterInfo, int, TMP_WordInfo?)

public CharData(int index, TMP_CharacterInfo cInfo, int wordIndex, TMP_WordInfo? wInfo = null)

Parameters

index int
cInfo TMP_CharacterInfo
wordIndex int
wInfo TMP_WordInfo?

Fields

InitialPosition

The initial position of this character.

public readonly Vector3 InitialPosition

Field Value

Vector3

InitialRotation

The initial rotation of this character.

public readonly Quaternion InitialRotation

Field Value

Quaternion

InitialScale

The initial scale of this character.

public readonly Vector3 InitialScale

Field Value

Vector3

defaultRotation

The default rotation of any CharData.

public static readonly Quaternion defaultRotation

Field Value

Quaternion

defaultScale

The default scale of any CharData.

public static readonly Vector3 defaultScale

Field Value

Vector3

info

Holds a selection of TMPro.TMP_CharacterInfo data.

public readonly CharData.Info info

Field Value

CharData.Info

mesh

The mesh of the character.

public readonly VertexData mesh

Field Value

VertexData

Properties

Position

The character's position.

public Vector3 Position { get; }

Property Value

Vector3

Rotation

The character's rotation.

public Quaternion Rotation { get; }

Property Value

Quaternion

RotationPivot

The character's rotation pivot.

public Vector3 RotationPivot { get; }

Property Value

Vector3

Scale

The character's scale.

public Vector3 Scale { get; }

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

initialMesh

The initial mesh of this character.

public ReadOnlyVertexData initialMesh { get; }

Property Value

ReadOnlyVertexData

positionDirty

Whether the position has been manipulated from the character's initial position.

public bool positionDirty { get; }

Property Value

bool

rotationDirty

Whether the rotation has been manipulated from the character's initial rotation.

public bool rotationDirty { get; }

Property Value

bool

scaleDirty

Whether the scale has been manipulated from the character's initial scale.

public bool scaleDirty { get; }

Property Value

bool

uvsDirty

Whether the UVs have been manipulated.

public bool uvsDirty { get; }

Property Value

bool

verticesDirty

Whether the vertices have been manipulated.

public bool verticesDirty { get; }

Property Value

bool

Methods

AddPivotDelta(Vector3)

Add a delta to the pivot of the character.
Note that the pivot is independent of the character's position, rotation and scale.

public void AddPivotDelta(Vector3 delta)

Parameters

delta Vector3

The delta to add to the position of the pivot.

AddPositionDelta(Vector3)

Add a delta to the position of the character.

public void AddPositionDelta(Vector3 delta)

Parameters

delta Vector3

The delta to add to the position of the character.

AddVertexDelta(int, Vector3)

Add a positon delta to the vertex at the given index.

public void AddVertexDelta(int index, Vector3 delta)

Parameters

index int

The index of the vertex.

delta Vector3

The delta to add to the position of the vertex.

Reset()

Reset changes made to the character's mesh, position, rotation, scale and pivot.

public void Reset()

ResetColors()

Reset the character's vertex colors.

public void ResetColors()

ResetPivot()

Reset the character's pivot.

public void ResetPivot()

ResetPosition()

Reset the character's position.

public void ResetPosition()

ResetRotation()

Reset the character's rotation.

public void ResetRotation()

ResetScale()

Reset the character's scale.

public void ResetScale()

ResetUVs()

Reset the character's UVs.

public void ResetUVs()

ResetVertices()

Reset the character's vertices.

public void ResetVertices()

SetPivot(Vector3)

Set the pivot of this character.
Note that the pivot is independent of the character's position, scale and rotation.

public void SetPivot(Vector3 pivot)

Parameters

pivot Vector3

The new position of the pivot.

SetPosition(Vector3)

Set the position of the character.

public void SetPosition(Vector3 position)

Parameters

position Vector3

The new position of the character.

SetRotation(Quaternion)

Set the rotation of this character.

public void SetRotation(Quaternion rotation)

Parameters

rotation Quaternion

The new rotation of this character.

SetScale(Vector3)

Set the scale of this character.

public void SetScale(Vector3 scale)

Parameters

scale Vector3

The new scale of this character.

SetVertex(int, Vector3)

Set the position of the vertex at the given index.

public void SetVertex(int index, Vector3 position)

Parameters

index int

The index of the vertex.

position Vector3

The new position of the vertex.