From the course: Cert Prep: Unity Certified Associate Game Developer Audio and Effects

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Detecting audio completion

Detecting audio completion - Unity Tutorial

From the course: Cert Prep: Unity Certified Associate Game Developer Audio and Effects

Start my 1-month free trial

Detecting audio completion

- When working with audio sources, a very common thing you'll want to do is to figure out when the audio has finished playing. This might be because when it's finished playing, you want to do something else. So in this movie, we're going to see how we can detect, when an audio source has finished playing and then you can respond to it however you need to. To demonstrate this, I've opened up this sample project here. The char sounds project included in the course exercise files. I've opened up the main scene which contains a ground plane, a character here based on the unity standard assets and also an empty audio source object. This object has already been configured with an audio source component containing an audio clip with a jump sound. It's a short fire jump sound that is intended to play whenever a character inside a game jumps. We'll be creating a script file to detect when the jump sound has finished playing.…

Contents