To The Sound — Audio Makes the Experience!

  1. Create an empty gameobject to hold an Audiosource component. In my case, I just added an Audiosource to my background gameobject.
The audiosource component.
Make sure Play on Awake and Loop are checked!
  1. Add an AudioSource to the gameobject you want the sound to come from. I put it on my Player.
A new AudioSource.
The Audioclip should be named something relevant to the sound you want it to make.
Lines 85 and 92 call the sound file to play.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jack Leavey

Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!