Code Examples
v4.0
Creating a Speak() method
Speak() methodpublic void Speak(string line, emotion = "", index = -1)
=> voice.PlayClip(audioSource, line, emotion, index);// Play a random clip form "Level Up", ignoring emotions
player.Speak("LevelUp");
// Play a random clip from "Let's Get Out of Here" with the "Scared" emotion
player.Speak("LetsGetOutOfHere", "Scared");
// Play a specific clip from "Great Loot", ignoring emotions
player.Spkea("GreatLoot", "", 2);Last updated