LogoLogo
Showcase & FeaturesDiscord✨Get on the asset store✨
Text Animations for UI Toolkit
Text Animations for UI Toolkit
  • Text Animations for UI Toolkit
  • Getting Started
  • Animated Visual Elements
  • Text Animation Settings
  • USS Properties
  • Templates
  • Performance Optimization Guide
  • Animations
    • Built-in Animations
    • Custom Animations
  • Typewriting
    • Built-in Text Appearance / Vanishing Animations
    • Typewriter Animation Settings
    • Typewriter Control Tags
  • Events
    • Events
    • Built-in Event Handlers
    • Custom Events
  • C# Extensions
    • Custom C# Animations
    • Custom Event Handlers
  • Technical Details
    • Limitations
Powered by GitBook
On this page
  • Keep your text short
  • Reduce the animation framerate

Was this helpful?

Performance Optimization Guide

PreviousTemplatesNextBuilt-in Animations

Last updated 4 months ago

Was this helpful?

Text Animations will likely not be a significant performance cost in your project. In case you should still run into problems, this guide may help you with your problems.

If you still have performance after reading this guide, make sure to contact me via , the , or on my .

Keep your text short

You should only animate short pieces of text. Instead of animating a large section at once, show the text sentence by sentence. If you can't avoid animating a large text, you could inline an Animated Visual Elements into a larger text, or split the large text into multiple smaller animated text elements that get shown with a delay, instead of putting the whole text into a single Animated Visual Elements.

Most of the performance cost will occur when you set the text property of the animated text element. Your text gets parsed (searching for tags in the text) and Labels are created for each letter. Text Animations for UI Toolkit tries to reuse visual elements, so the first call will most likely be the most performance costly one.

Reduce the animation framerate

If you haven't already done so, create a Text Animation Settings object in your project folder (Create > Stix Games > Text Animations for UI Toolkit). Add the settings object to your Animated Text Element in UI builder or via script.

You can change the Target Frame Rate in the Performance section of the Text Animation Settings object. A lower target frame rate means the text is updated less frequently, improving performance.

Make sure to add the Text Animation Settings object to your animated text elements (in UI builder or via script) or the settings will be ignored!

my support email
contact form
Discord