Playing sound effects during the conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Esylin
Posts: 45
Joined: Thu Dec 16, 2021 1:21 am

Playing sound effects during the conversation

Post by Esylin »

How do I play sound effects during the conversation?

This includes:
1) Sound effect when player choice and continue buttons are pressed.
2) Sound effect when cursor is hovering above a choice.
3) Sound effect when characters are speaking.
User avatar
Tony Li
Posts: 22154
Joined: Thu Jul 18, 2013 1:27 pm

Re: Playing sound effects during the conversation

Post by Tony Li »

Hi,

> 1) Sound effect when player choice and continue buttons are pressed.
> 2) Sound effect when cursor is hovering above a choice.

Add an Audio Source and an Event Trigger component to the button. Configure PointerEnter (hover) and PointerUp (click) events to play sounds.

> 3) Sound effect when characters are speaking.

Here are two ways:

A. Add audio clips to the typewriter effects of your dialogue UI's Subtitle Text objects. This is often used for "mumble speak". If you want to vary the clips per character, see this post.

B. If you want to play actual voiceover, see the Cutscene Sequence Tutorials, in particular part 4. (Briefly, use AudioWait() sequencer commands.) If you don't have any recorded audio, you can use RT-Voice for text-to-speech.
Post Reply