# Add effects to your texts

## Categories Overview <a href="#effects-categories" id="effects-categories"></a>

Effects are divided in three categories, based on their functionality/application. They consist of:

<table data-view="cards"><thead><tr><th align="center"></th><th></th><th></th></tr></thead><tbody><tr><td align="center"><strong>Behavior Effects</strong> </td><td><img src="/files/ErJa9AI1D3NEL6ZBQ0nn" alt="An example of the Behavior Effect <wiggle>" data-size="original"></td><td>Behavior Effects animate letters continuously during time, as long as a letter is visible.</td></tr><tr><td align="center"><strong>Appearance Effects</strong>   </td><td><img src="/files/gn8RJ2zEqFp67G6URYXg" alt="An example of the Appearance Effect {vertexp}" data-size="original"></td><td>Appearance Effects animate letters only when they’re appearing on screen. For this reason, they’re mostly used in combination with the typewriter, which shows letters one after another.</td></tr><tr><td align="center"><strong>Disappearance Effects</strong> </td><td><img src="/files/ei7NAUXddYdHIpFlmbFa" alt="An example of the Disappearance Effect {#size}" data-size="original"></td><td>Disappearance Effects animate letters when they just became not-visible, and under the hood they’re simply Appearance effects in reverse.</td></tr></tbody></table>

{% hint style="info" %}
A list of built-in effects is available here: [Built-in effects list](/text-animator-unity/2.x/effects/built-in-effects-list.md)
{% endhint %}

***

## How to Apply Effects <a href="#how-to-apply-effects" id="how-to-apply-effects"></a>

You can set different effects to your text in two main ways:

* [#set-default-effects-to-the-entire-text](#set-default-effects-to-the-entire-text "mention") (inspector)
* [#set-effects-to-specific-parts-of-the-text](#set-effects-to-specific-parts-of-the-text "mention") (rich text tags)

### Set default effects to the entire text <a href="#set-default-effects-to-the-entire-text" id="set-default-effects-to-the-entire-text"></a>

You can set which effect(s) will be applied to all letters by default in the TextAnimator component, **without having to write effects tags for every text**.

1. Head over to the TextAnimator component and visit the “Default Tags” section

   <img src="/files/7P2pVZm6AFC0PxQF2vkK" alt="text animator default tags overview" width="600">
2. Expand the effect’s category you want to edit
3. Add any effect tag you want to include, example:

{% hint style="info" %}
&#x20;If you don’t want any effect applied by default, simply set the effects’ count to zero.
{% endhint %}

{% hint style="success" %}
You can also change the "**Default Tags Mode**" to "**Constant**" if you want effects to be applied all the time, on top of everything.
{% endhint %}

{% hint style="success" %}
You can add Modifiers to each array element, like "shake a=5", read more here: [Modifiers](/text-animator-unity/2.x/effects/add-effects-to-your-texts/modifiers.md)
{% endhint %}

### Set effects to specific parts of the text <a href="#set-effects-to-specific-parts-of-the-text" id="set-effects-to-specific-parts-of-the-text"></a>

You can apply effects to specific parts of your text by using rich text tags, overriding the default ones (if any "Fallback" is present).

The effects tag will look like this:

* **Behaviors**: `<tag>` to open, `</tag>` to close
* **Appearances**: `{tag}` to open, `{/tag}` to close
* **Disappearances**: `{#tag}` to open, `{/#tag}` to close\
  \&#xNAN;*(basically an appearance tag with a `#` before it, to simply remind you that disappearances are appearances in reverse)*.

{% hint style="info" %}
Once you close an effect tag, the letters will be affected again by the default effect (if any "Fallback" is set).
{% endhint %}

{% hint style="danger" %}
Be careful, do not use TMPro right text tag formatting!
{% endhint %}

<details>

<summary>Example 1: Simple Effect</summary>

Example: “`I'm cold`” can be written as “`I'm <shake>cold</shake>`” (in the text component) in order to apply a *shaking* behavior effect on the specific word “cold”.

<img src="/files/NhKEkRoLK44nxrB2yB9Y" alt="Untitled" data-size="original">

</details>

<details>

<summary>Example 2: Fallbacks</summary>

Let's say that we have one default effect ("size"), but we want to apply a specific part of the text with the "fade" effect.\
We can achieve that result by writing: "default default \`{fade}\` fade fade fade \`{/fade}\` default default"

![](/files/weiJ79XONq15aYF8Pt2W)

As you can see, the letters that are outside the "fade" tags will have the default effect(s) applied, while the part inside "{fade}" and "{/fade}" will only have "fade".

</details>

***

### Extra notes about Rich Text formatting <a href="#extra-notes-about-rich-text-formatting" id="extra-notes-about-rich-text-formatting"></a>

By using TextAnimator for Unity:

* You can stack multiple effects together (e.g. “`<shake><size>`”).\
  (also have a look at [Styles](/text-animator-unity/2.x/effects/add-effects-to-your-texts/styles.md))
* You can close **all** currently opened effects with a single ‘`/`’ character, like:
  * ”`</>`” for Behavior Effects
  * ”`{/}`” for Appearance Effects
  * ”`{/#}`” for Disappearance Effects.
* There is no need to close tags if you’re at the end of the text, since Text Animator starts applying effect from the moment you open a tag. (e.g. "`<shake>hello`" will result in hello already animating).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.febucci.com/text-animator-unity/2.x/effects/add-effects-to-your-texts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
