In TextAnimator for Unity, other than having built-in effects ready to use, you can also create your own directly from the Inspector, without having to write any script (but you could also code if you want).
When creating a new Effect ScriptableObject, you can head over the “Special” section from Project view -> Create -> Text Animator -> Special Effects.
These effects let you create custom combinations of already existing effects, or create your own ones from scratch.
P.S. To use an effect, remember to add it to a Database and reference it in a TextAnimator component.
Custom Effects might have some modules in common, which let you control your animation in different ways.
Start Delay: the time to wait before starting the animation.
Use Uniform Time: if enabled, the animation will use the same time for all characters. If disabled, the animation will play based on a character “alive” time.
Wave Size: a time offset to apply to every character progressively. This is useful to create a wave-like effect, where the first character is slightly below the second one and so on.
Time Speed: the speed of the animation.
Controls the influence and duration of the entire effect.
Cycles: the number of times the animation will be repeated. ‘-1’ means infinite.
Duration: how long a cycle should last.
Weigth Over Time: the intensity of the effect during a cycle. You can have it be always 1, thus having an animation that is always on, or you can have it fade in or out. (P.S. To create a Disapperance Effects, simply have it go from 1 to 0 as you would with an Appearance, and Text Animator will play it in reverse when needed.)
Whenever you see an Animation Curve (Unity Docs) in any module in the inspector (like the “Weight Over TIme”), remember that you can edit the “Post Wrapping Mode” to make it loop, ping-pong or be clamped once a cycle finishes.
(For example, if you’re creating an animation that repeats or loops X times, you might want to set the Post Wrap Mode to “Loop” so that the animation doesn’t stop after the first cycle finishes.)
This Scriptable lets you create your own effect from scratch, applying its animation to an entire character.
Their functioning is similar as the rest of the asset. You are able to choose an
amplitude (the intensity/strength), apply some
wave size if you’d like to have some time differences between consecutive characters, and choose a per-module
weight over time to control the intensity of an individual module during a cycle.
This Scriptable works similar to the “Uniform Curve” one, but lets you specify a different animation for each vertex of a character (each character has 4 vertices, starting from bottom left and proceeding clockwise).
This Scriptable lets you combine multiple effects together, under a single Effect Tag (of course you can assign any animation, including built-in ones).
For example having both a “shake” and “wave” animations with specific parameters, that you can later use with
Composite With Emission
Same as above, but you also have an “Emission” module that lets you control the effect intensity through time.
This is pretty useful in case you have an animation that is usually designed to be infinite, like the “Shake” behavior effect, but you’d like to convert it to an Appearance/Disappearance one (thus, having it to play only in one cycle and with an emission from 1 to 0).
As you discovered, thanks to custom effects you’re able to create pretty powerful combinations and results. That said (as with anything powerful) it’s up to you to use them wisely! In theory you could create an endlessly reference of animations inside each one, resulting in a stack-overflow, or per-vertex animations that are too demanding for your target hardware, resulting in a frame drop if you have too many texts/animations, so please be careful to not overdo things!
That said… have fun!