Custom C# Animations

Unless you want to create an animation that dynamically reacts to external events, or an animation that includes randomness, like <shake> you can use Custom Animations instead of Custom C# Animations.

To create a custom animation you need 3 steps:

  • Create a class inheriting from TextAnimation. It will be responsible for animating the text.

  • Create a class inheriting from TextAnimationTagParser. It will parse the tag and create a TextAnimation object with the right parameters.

  • Register the parser.

Text Animation

In this example we'll create a simple animation that moves opacity between 0 and 1.

The annimation we're going to create in this short tutorial.

Text Animation Tag Parser

Registering the parser

There are two ways to register an AnimationParser for your text elements:

How to use the new animations

Now everything is set up, you can use the animations like any other:


You can also look at the code of all built-in animations for inspiration.

If you need help developing custom animations or want to share your creations, join my Discord and start a discussion!

Last updated

Was this helpful?