Best Practices
Find all common best practices when using Text Animator for Unity.
Every project is different, but in this page you can find some common best practices that can help you set up everything better and avoid most common issues!
Use Text Animator "SetText/ShowText" methods instead of TMPro
If you're setting text via code, please use Text Animator or its typewriter directly instead of TextMeshPro.
API of reference: textAnimator.SetText, typewriter.ShowText
Set the entire text/dialogue only once
Please try to set text just once, and use the typewriter / visibility methods to control how it appears.
If you really need to append text later in time, you can use the "textAnimator.AppendText" method.
Use TextAnimator's "ScheduleMeshRefresh" instead of TMPro.ForceMeshUpdate()
If you call "tmpText.ForceMeshUpdate", TextAnimator might lose some references and not display letters correctly. If something changed in the text that makes you want to call that function, please try calling TextAnimator "ScheduleMeshRefresh" instead! [Scripting API] It'll perform that method on the next frame, but keep all references intact.
If you're changing something in the text inspector but it's not getting updated, please let us know!
Last updated