Is possible to insert animated sprites in TextMeshPro?

I know that there is a tag for inserting sprites <sprite …> in TextMeshPro. I want to insert animated sprites…

You can use the “anim” attribute with the tag. See the following [post]( TextMesh Pro - Advanced Text Rendering for Unity - Beta now available in Asset Store page-26#post-2790861) for an example.

The text used in this example is as follows: “Animated Sprites”

anim=“first index, last index, frame rate”

Thank you! This solves all my problems!

Still, there is one problem…
AB<sprite=0> - in this case, the size of the single and animated sprite is different.
Unity 2020.1.14 TextMeshPro 3.0.3

See if making the following changes to the TMP_SpriteAnimator.cs file resolves the issue.

Yes, it works. The size and a place is the same. Hopefully this will be included in the next version of TextMeshPro.
Thank you!

I would like to see better animation management in the next version. Next method is very useful (for me :)):

public void DoSpriteAnimation((int currentCharacter, TMP_SpriteAsset spriteAsset, int[ ] frames, int framerate)
and tag:
,frameK - any sprite from spriteAsset

I’ll add this to the list of feature requests :slight_smile:

P.S. You can re-order the sprites in the Sprite Character Table as seen below.

6583018--747691--upload_2020-12-2_17-11-29.png

If you are referencing sprites by index then changing their order can be an issue. However, if you are referencing these sprites by Unicode code point then changing their order will have no impact on them being referenced in the text but will enable you to change the order with respect to animating them.

Would be possible to create a rotation animation?
Something like this:

Text

Where 15 is the rotation speed per second.

I can certainly take a look at this when I have time but I am pretty swamped right now.

On the other hand, you should be able to create a script that you would add to a text object that would rotate specific characters. I would suggest you take a look at the example and scripts used in “23 - Animating Vertex Attributes” which is included in the TMP Examples & Extras.

In that example, we modify the vertex position of the characters to create some Jitter FX and also change the vertex colors to animate colors. Creating a similar script to rotate all or a specific character would be easy to do.