# How to add effects

You can add effects to your texts in the following ways:

### 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 add effects to specific parts of your text by using **rich text tags.**

The effects tag will look like this:

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

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2FsNWP4FirbP7rwT5nMSgN%2FTag_Example_TAnim3.0.mp4?alt=media&token=cbc0e61e-038a-4b3e-9116-432cf6ca6a94>" %}

#### 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/customization/styles.md))
* You can close **all** currently opened effects with a single ‘`/`’ character, like:
  * ”`</>`” for Persistent 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).

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXuXUTa2X5PYuYL6yRvl1%2Fuploads%2FBg3rDgfMUSYXWod3YRWa%2FStackEffects.mp4?alt=media&token=cb667514-8b82-40d2-b4ff-6450e652aa52>" %}

{% hint style="info" %}
To display raw text, use the `<noparse>` tag to prevent Text Animator from parsing other tags.
{% endhint %}

***

### 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 decide which effect(s) will be applied to all letters by default, **without having to write effects tags inside your texts** thanks to [Animator Settings](/text-animator-unity/effects/how-to-add-effects/animator-settings.md).

{% tabs %}
{% tab title="UI Toolkit" %}
AnimatedLabel's settings are handled via different scriptable objects (in this case, the one highlighted in the image below). Read more here on [how to create one](/text-animator-unity/effects/how-to-add-effects/animator-settings.md).

{% hint style="success" %}
If you didn't set one, the one in the [Global Settings](/text-animator-unity/customization/global-settings.md) will be used!
{% endhint %}

<figure><img src="/files/IBFQ3tZBmGxKKauVUp3I" alt="" width="314"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Text Mesh Pro" %}
For Text Mesh Pro, settings can be "local" (bound to the component), or "shared" (between other Text Animator instances).

* To modify **local** settings, simply head over to the "TextAnimator - Text Mesh Pro" component inspector and tweak their values.
* To modify **shared** settings, assign the relative ScriptableObject instance. [Read more here](/text-animator-unity/effects/how-to-add-effects/animator-settings.md).
  {% endtab %}
  {% endtabs %}

Inside the settings:&#x20;

1. Visit the “Default Tags” section
2. Expand the effect’s category you want to edit
3. Add any effect tag you want to include, for example:

<figure><img src="/files/V8CXtYn70qdnsPDZXc81" alt="" width="362"><figcaption></figcaption></figure>

{% 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/effects/how-to-edit-effects/modifiers.md)
{% endhint %}

<details>

<summary>Example: 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>


---

# 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/effects/how-to-add-effects.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.
