Typewriter Effect FMOD typing sound support

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
gaelgamesdev
Posts: 16
Joined: Wed Jan 19, 2022 11:17 am

Typewriter Effect FMOD typing sound support

Post by gaelgamesdev »

Hello!

I'm using FMOD in my project, witch means I won't be able to use the TextMeshProTypewriterEffect sound functionality.

How can I add FMOD support for the typewriter script?

Thank you!
User avatar
Tony Li
Posts: 22142
Joined: Thu Jul 18, 2013 1:27 pm

Re: Typewriter Effect FMOD typing sound support

Post by Tony Li »

Hi,


Make a subclass of TextMeshProTypewriterEffect, and override the PlayCharacterAudio() method. Example:

Code: Select all

public class MyTypewriterEffect : TextMeshProTypewriterEffect
{
    protected override void PlayCharacterAudio()
    {
        FMODUnity.RuntimeManager.PlayOneShot("event:/Typewriter");
    }
}
User avatar
gaelgamesdev
Posts: 16
Joined: Wed Jan 19, 2022 11:17 am

Re: Typewriter Effect FMOD typing sound support

Post by gaelgamesdev »

Thanks! Got it working!
User avatar
Tony Li
Posts: 22142
Joined: Thu Jul 18, 2013 1:27 pm

Re: Typewriter Effect FMOD typing sound support

Post by Tony Li »

Great! Glad to help.
Post Reply