1️⃣ You're browsing the documentation for version 1.X. If you want to check version 2.X instead, please go here. 1️⃣


Creating Effects in the Inspector

More than using built-in effects, you can also create your own directly from the Inspector, without having to code.

Effect Visibility

Custom effects can either be local or global.

Local Effects

Local effects are applied only in the TextAnimator component that stores them.

To create a local effect, simply create one in a TextAnimator component in the category of your choice.

text animator create local effect
Example: creating a local Behavior effect

Global Effects

Global effects are shared and recognized between all TextAnimator instances, in all scenes.

They’re stored in a Scriptable Object named “TextAnimator GlobalData”, inside a Resources folder.

text animator resources folder gdata

(If your project doesn’t have a Resources folder, simply create it).

You can create a TextAnimator GlobalData Scriptable Object from the Project’s Context Menu (right click inside the project window).

text animator create globaldata scriptable


Creating Effects

After you’ve selected the effects container (TextAnimator component if you’re creating a local effect, or the ScriptableObject if you’re creating a global one):

  • Expand the effect category
  • Add a new effect
tanimator globaldata create effect
Example: creating a global Appearance effect

You can now edit the effect info and its different modules.

Effect ID (tag)

In the first section of the effect, you can find a text field where you can set the effectID (or effect tag).

Untitled1

👍🏻 If a local effect has the same tag (and type) of a global effect, the local effect will be applied.


After it, you can find a series of modules that control letters’ over time. To create your effect, you can enable one, multiple or all of them.


Common Modules

Movement, Scale and Rotate Modules

These modules control each letter movement, scaling or rotation.

Untitled2

You can tweak the following values:

  • Amplitude: represents the effect strength (it will also be multiplied by the curve intensity)
  • Chars Time Offset: distributes the effect along letters (0 = all letters will have the same time, so, the same effect strength at a given moment).

Curve

You can also use AnimationCurves value to control how the effect is applied over time. You can specify their duration, tangents and post-wrap behavior. Read more about Animation Curves in the Unity Documentation.

Curves’ intensity is applied differently depending on the type of effect you want to create.

For Behavior Effects:

  • Intensity over time: controls the effect intensity over time.
    • Example, with an amplitude of 5: A curve value of 0 means that no effect is applied. A value of 0.5 means that the effect is 2.5. A value of 1 means that the effect is 5;
    • Usually you want this in the [-1, 1] range, starting from a value and loop back to it.

For Appearance Effects:

  • Decay over time: controls the effect’s decay over time. (So, the inverse of the Behaviors’ curve.)
    • Example, with an amplitude of 5: A curve value of 0 means that the effect is 5, entirely applied. A curve value of 0.5 means that the effect is 2.5. A value of 1 means that the effect is 0 (has a full decay);
    • Usually you want this to start from 0 and reach 1.

Color Module

Untitled3

  • Gradient: sets a color value in a specified percentage. (example: If you have a duration of 5, the color on second “2.5” must be set at a percentage of 50%.)
  • Duration: sets the module duration.
  • Chars Time Offset: same description/utility as above modules.

Specific modules for Behavior Effects

The following modules are present only if you’re creating Behavior effects.

Emission Module

Controls how the entire effect behaves during its lifetime (so, affecting all other modules).

Untitled4

  • Attack Curve: controls the effect intensity at start 👍🏻 If you want the effect to start immediately, you can set set all this curve’s keys’ time to 1. 👍🏻 If you want the effect to start after X seconds, move the first curve’s key’s position and make it start after X delay.
  • Continue Forever: true if you want the effect to continue forever after its start.
  • Decay Curve: controls the effect intensity in the end
  • Cycles: how many times the effect can loop (0 = infinitely, with the decay applied)

👍🏻 A total effect duration is calculated from: attackCurveDuration + [max duration between all other modules] + decayCurveDuration.

End of the page. Go back to the Documentation Index.