Table of Contents

TMPEffectTag

TMPEffectTag, together with TMPEffectTagIndices, is the data structure used to represent a tag in the code, for example animation tags or command tags.
The API docs can be found here.

Properties

The TMPEffectTag consists of the following properties:

  • Name : string
  • Prefix : char
  • Parameters : ReadOnlyDictionary<string, string>

Example: the show tag <+fade anc=zero dur=0.55> would be:

  • Name : "fade"
  • Prefix : '+'
  • Parameters : {{ "anc", "zero" }, { "dur", "0.55" }}

Indices

The TMPEffectTagIndices struct consists of:

  • StartIndex : int
  • EndIndex : int
  • OrderAtIndex : int

The indices are a half open interval; meaning a tag with a StartIndex of 5 and an EndIndex of 12 will "contain" the indices 5, 6, 7, 8, 9, 10, 11 and 12.

The OrderAtIndex is used to maintain an order if there are multiple tags at the same index. Generally speaking, the tags' OrderAtIndex won't be sequential (i.e. 1, 2, 3, and so on), but may skip around. You will notice this if you iterate, for example, over the BasicTags property of a TMPAnimator. The only invariant OrderAtIndex it guaranteed to follow is that they are sorted from smallest to largest.