Hi,
Yes, you can add voice/audio files to your dialogues. If you just want to play audio without lipsync animation, here are the basic steps:
1. Record the audio files.
2. Create a folder named "Resources" anywhere in your project, and put the audio files in the folder. You can use subfolders. For example:
Code: Select all
Assets/
_MyGame/
Resources/
Lincoln/
four_score_etc
McClellan/
vote_for_me
(Side note: The Dialogue System supports using asset bundles in addition to Resources folders.)
3. In your dialogue entry, add an
AudioWait() sequencer command to the
Sequence field to play the audio clip:
- Dialogue Text: "Four score and seven years ago..."
- Sequence: AudioWait(Lincoln/four_score_etc)
Notes:
- AudioWait() waits for the audio to finish playing before progressing to the next dialogue entry. Audio() starts playback and immediately progresses to the next entry.
- You can see that it would be tedious to manually add each AudioWait() command. Once you get the hang of using sequences, you can read about How to Use Entrytags to simplify the process.
If you don't have prerecorded audio, you can use a product like RT-Voice to play synthesized voices using your OS's robotic-sounding voice synthesizer features. (See
RT-Voice Support.)
If you want to play lipsync animation that moves the NPC's mouth in time with the words, you have several options. The Dialogue System is not a lipsync tool. Instead, it provides support for other lipsync plugins that you can get on the Unity Asset Store and elsewhere. The easiest plugin in my opinion is SALSA (see
SALSA Support). Rogo LipSync is also an excellent lipsync product. It requires an additional setup step, but the mouth motions are slightly more realistic. (See
LipSync Support.)
See
How To Add Lipsync for a general overview of using lipsync in the Dialogue System with various products.