# 커스텀 타이핑 대기 작성(C#)

“Text Animator for Unity”를 사용하면 직접 **맞춤형 타자기 대기**를 만들고 글자 사이에 다양한 지연을 설정하는 등 더 많은 작업을 할 수 있습니다.

{% hint style="info" %}
대신 기본 타자기에 대해 알고 싶다면, [여기를 읽어보세요](/text-animator-unity/3.x-ko/typewriter/show-and-hide-letters-dynamically.md)
{% endhint %}

{% hint style="info" %}
반드시 읽었는지 확인하세요 [고급 개념](/text-animator-unity/3.x-ko/writing-custom-classes/advanced-concepts.md) 페이지도.
{% endhint %}

***

## 맞춤형 타자기 대기 추가 <a href="#adding-custom-typewriters" id="adding-custom-typewriters"></a>

맞춤형 타자기 대기를 만들려면 다음을 상속하는 Scriptable Object 클래스를 만들어야 합니다 `Febucci.TextAnimatorForUnity.TypingsTimingsScriptableBase`

다음은 간단한 예제 스크립트입니다:

<pre class="language-csharp"><code class="lang-csharp">// 필요한 Febucci 네임스페이스를 가져옵니다
<strong>using Febucci.TextAnimatorCore;
</strong><strong>using Febucci.TextAnimatorCore.Text;
</strong><strong>using Febucci.TextAnimatorForUnity;
</strong>
using UnityEngine;

[System.Serializable] // &#x3C;--- Scriptable을 직렬화하는 것을 잊지 마세요!
[CreateAssetMenu(fileName = "Custom Typewriter Waits")]
<strong>class CustomTypingWaits : TypingsTimingsScriptableBase
</strong>{
    // --- 일반적으로 여기에 속성을 넣습니다
    [SerializeField] float delay = .1f;
    
    // 텍스트를 표시할 때의 커스텀 대기
<strong>    public override float GetWaitAppearanceTimeOf(CharacterData character, TextAnimator animator)
</strong>    {
        // 예시: 공백은 건너뜁니다
        if (char.IsWhiteSpace(character.info.character))
            return 0;

        return delay;
    }

    // 텍스트가 사라질 때의 커스텀 대기
<strong>    public override float GetWaitDisappearanceTimeOf(CharacterData character, TextAnimator animator)
</strong>    {
        // 이 경우에는 나타날 때와 동일합니다
        return GetWaitAppearanceTimeOf(character, animator);
    }
}
</code></pre>

***

{% hint style="success" %}
그게 전부입니다!&#x20;
{% endhint %}

{% hint style="warning" %}
자산 폴더에 Scriptable Object를 생성하고 Typewriter 컴포넌트에 할당하는 것을 잊지 마세요. 자세한 내용은 여기를 읽어보세요: [글자를 동적으로 표시하고 숨기기](/text-animator-unity/3.x-ko/typewriter/show-and-hide-letters-dynamically.md)
{% endhint %}

직접 타자기를 구현하며 즐거운 시간 보내세요 <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/3.x-ko/writing-custom-classes/c-1.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.
