# Writing Custom Typing Waits (C#)

By using “Text Animator for Unity” you can create your own **custom typewriter waits**, setting different types of delays between letters and much more.

{% hint style="info" %}
If you want to learn about the default typewriter instead, [read here](/text-animator-unity/typewriter/show-and-hide-letters-dynamically.md)
{% endhint %}

{% hint style="info" %}
Be sure to have read the [Advanced Concepts](/text-animator-unity/writing-custom-classes/advanced-concepts.md) page as well.
{% endhint %}

***

## Adding Custom Typewriter Waits <a href="#adding-custom-typewriters" id="adding-custom-typewriters"></a>

In order to create a custom typewriter wait  you need to to create a Scriptable Object class that inherits from `Febucci.TextAnimatorForUnity.TypingsTimingsScriptableBase`

Here is a simple example script:

<pre class="language-csharp"><code class="lang-csharp">// import the necessary Febucci namespaces
<strong>using Febucci.TextAnimatorCore;
</strong><strong>using Febucci.TextAnimatorCore.Text;
</strong><strong>using Febucci.TextAnimatorForUnity;
</strong>
using UnityEngine;

[System.Serializable] // &#x3C;--- remember to serialize your scriptables!
[CreateAssetMenu(fileName = "Custom Typewriter Waits")]
<strong>class CustomTypingWaits : TypingsTimingsScriptableBase
</strong>{
    // --- put your properties here as normal
    [SerializeField] float delay = .1f;
    
    // custom waits when showing text
<strong>    public override float GetWaitAppearanceTimeOf(CharacterData character, TextAnimator animator)
</strong>    {
        // example: skips spaces
        if (char.IsWhiteSpace(character.info.character))
            return 0;

        return delay;
    }

    // custom waits when disappearing text
<strong>    public override float GetWaitDisappearanceTimeOf(CharacterData character, TextAnimator animator)
</strong>    {
        // in this case, it's the same as appearances
        return GetWaitAppearanceTimeOf(character, animator);
    }
}
</code></pre>

***

{% hint style="success" %}
That’s it!&#x20;
{% endhint %}

{% hint style="warning" %}
Don’t forget to create the scriptable object in your assets folder, and to assign it to your Typewriter component. Read more here: [Show and hide letters dynamically](/text-animator-unity/typewriter/show-and-hide-letters-dynamically.md)
{% endhint %}

Have fun implementing your own typewriters <3


---

# 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/writing-custom-classes/writing-custom-typing-waits-c.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.
