Text Animator for Unity
More ToolsTutorialsDiscord✨ Get Text Animator ✨
2.X 🇬🇧
2.X 🇬🇧
  • ❤️Welcome
    • Text Animator for Unity
    • Features
    • Games Showcase
    • Quick Start
  • ✨effects
    • Add effects to your texts
      • Modifiers
      • Styles
      • Databases
    • Preview and Edit effects
      • Dynamic Scaling
      • Time Scale
    • Built-in effects list
    • Create your own effects
      • Create effects in the Inspector
        • Curve Effects
        • Composite Effects
      • Writing Custom Effects (C#)
  • ✏️typewriter
    • Show and hide letters dynamically
    • Play sounds when a letter is shown
    • Trigger Events when typing
    • Wait Actions when typing
  • 🤝Integrations
    • Integrated Plugins & Dialogues Systems
      • Dialogue System for Unity
      • Yarn Spinner
      • Ink
      • Game Creator 2
      • Unity Localization Package
      • Playmaker
      • Unity Visual Scripting
      • Naninovel
    • How to manually integrate Text Animator
  • Extra Customization via C#
    • Writing Custom Typewriters (C#)
    • Writing Custom Actions (C#)
  • Other
    • Best Practices
    • Requirements & Limitations
    • Frequently Asked Questions
    • Support
    • Changelog
      • 2.X
      • Upgrading from 1.X to 2.X
      • 1.X
    • Scripting API
Powered by GitBook
On this page
  1. typewriter

Play sounds when a letter is shown

PreviousShow and hide letters dynamicallyNextTrigger Events when typing

Last updated 9 months ago

To implement typewriter sounds in your game, you can subscribe to the Typewriter’s “OnCharacterVisible” event and play sounds based on it.

The event passes a “char” as a parameter, so you can play different sounds based on different letters as well.

P.S. The event is also triggered with spaces, so be sure to play sounds based on the type of character you prefer.


Example Package

As an example, you can install the “TypeWriter Sounds” package found inside the “Extra” folder and check its implementation.

Variable
Explanation

Source

Main audio source where sounds will be played

MinSoundDelay

Minimum time that has to pass before playing another sound

Interrupt Previous Sound

If true, the previous audio will be stopped

Random Sequence

If true, the next audio clip to play will be chosen randomly from the “Sounds” array. If false, sounds will be played subsequently

Sounds

Typewriter sounds to play

✏️