Adding Voice Over Instructions in Unity

Play an audio with the instructions when the player reach a part of the level

Rusben Guzman
Dec 14, 2021

Objective: create a script to trigger an audio with the instructions when the player reach the collider.

First we have to create a new C# script called VoiceOverTrigger.

Then we have to add the script to the trigger game objects.

In the script declare an AudioClip variable and assign the clip in the inspector. Using the OntriggerEnter we are going to check for the player tag and check if the audio variable is not null and the last step is use the function AudioSource.PlayClipAtPoint() passing the audio clip and the position.

And that’s it!!! When Darren reaches the trigger the audio instructions are played.

--

--

Rusben Guzman
Rusben Guzman

Written by Rusben Guzman

A Software Engineer passionate about game dev and interactive products with Unity. I consider video games to be the artistic expression of programming.

No responses yet