Daniel Lyons' Notes

Free Workshop 15 Minute 3D Game

Highlights

Links & Resources For This Video

Get free sounds: https://freesound.org/

Get free music: https://newgrounds.com/

-- Voice Over Trigger Script--


\*Be sure you name it VoiceOverTrigger.cs\* 👇

using System.Collections;  
using System.Collections.Generic;  
using UnityEngine;

public class VoiceOverTrigger : MonoBehaviour

{

    public AudioSource audioSource;  
    public AudioClip audioClip;

    private void OnTriggerEnter(Collider other)

    {

        if(other.gameObject.name == "FirstPersonController")

        {  
            audioSource.Stop();  
            audioSource.clip = audioClip;  
            audioSource.Play();  
        }

    }

}

My Notes

Free Workshop 15 Minute 3D Game
Interactive graph
On this page
Highlights
Links & Resources For This Video
My Notes