# 글자가 표시될 때 소리 재생

게임에서 타자기 소리를 구현하려면 Typewriter의 “`OnCharacterVisible`” 이벤트를 구독하고 이에 따라 소리를 재생할 수 있습니다.

이벤트는 매개변수로 “char”를 전달하므로 다른 문자에 따라 다른 소리를 재생할 수 있습니다.

*추신: 이벤트는 공백에서도 트리거되니 선호하는 문자 유형에 따라 소리를 재생하도록 하세요.*

***

### 예제 패키지 <a href="#example-package" id="example-package"></a>

예시로 “Extra” 폴더 안에 있는 “TypeWriter Sounds” 패키지를 설치하고 구현을 확인할 수 있습니다.

![](/files/467b31bd5ee67d4bc265dc3e1a93a85cc5e57883)

<table><thead><tr><th width="221">변수</th><th>설명</th></tr></thead><tbody><tr><td><code>출력 장치</code></td><td>소리가 재생될 주요 오디오 소스</td></tr><tr><td><code>MinSoundDelay</code></td><td>다음 소리를 재생하기 전에 경과해야 하는 최소 시간</td></tr><tr><td><code>이전 소리 중단</code></td><td>true이면 이전 오디오가 중단됩니다</td></tr><tr><td><code>무작위 순서</code></td><td>true이면 재생할 다음 오디오 클립이 “Sounds” 배열에서 무작위로 선택됩니다. false이면 소리가 순차적으로 재생됩니다</td></tr><tr><td><code>소리들</code></td><td>재생할 타자기 소리</td></tr></tbody></table>


---

# 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-ko/typewriter/undefined-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.
