Voices
v3.0
Last updated
v3.0
Last updated
This is the main "Voices" scriptable object which is created when creating the Voices Module. Once this is populated, you need to attach it to your game controller, or other object in your game. A reference to this object is required for switching or assigning Voice objects at runtime.
There are three tabs available which will allow you to manage the Voices, Lines, and Emotions. Expanding the Show Auto Fill foldout will allow you to make use of the Auto Fill feature, explained below. The Manage Types foldout will allow you to manage types you've added using the Add new type box.
Select your directory containing your AudioClips
which will be used in this Voices
object in the provided field. Then, click the "Auto Fill Contents". If you have named your AudioClip
files correctly, the script will automatically create Voices, Lines, and Emotions, and populate the AudioClips
for you. This feature will not delete any current data. If you add new AudioClips
to your project, you can run this again to add the new content to the module.
Expanding a voice, you'll be able to populate the AudioClips for each line and emotion, as well as the default clips for each line. You can also delete the voice.
Line or Emotions that do not have any AudioClips
assigned will be grey. Drag an audio clip into one of these fields (marked "Add new AudioClip here") to add a clip to the list. Each Line/Emotion can have multiple audio clips attached to it. This way you can have different versions of the same line/emotion, which can be randomly played at runtime for variety.
It is not required to populate all AudioClip
fields -- only the ones you are using in your project.
The Lines tab allows you to add and rename lines. Good practice may be to use CamelCase
to name each line something logical you can remember. The string you assign here is what you will be calling as part of the PlayClip
method. When you add, rename, or delete a Line, all of the Voice objects in the Voices scriptable object will be updated.
Emotions are optional. They are intended to be used for major variations of lines. As an example, you may have a line a player can say, "Let's get out of here" (which would be called LetsGetOutOfHere
). You may wish to have various emotions for this and other lines such as "Frightened" or "Confident" or "Dying" etc.
When you add, rename, or delete an Emotion, all of the Line objects on all of the Voice objects in the Voices scriptable object will be updated.