CTIN 289 - Interactive Snippets Library

Powered by 🌱Roam Garden

Play Audio


First, create an AudioSource variable that stores the sound object, then .Play() it wherever.

Public AudioSource sound;

sound.Play();

Next, remember to create an audio source to put your sound clip file into it and drag that to the AudioSource variable.

Some other basic functions for audio such as pausing and stopping are:

crankAudioSource.Pause();

crankAudioSource.Stop();