Audio issue in the 2D roguelike tutorial

Hi, I’m new to unity but I followed every step and line of code from the 2D roguelike tutorial but no sound plays in the game itself. Code shouldn’t factor into it, seeing as it’s only a game object with an audio source attached. I have the mute check box un-checked, I have volume at .5, “Play on awake” and “Loop” are also checked, and I also added an audio listener component to the player character just in case that was the issue. In the editor itself I can toggle the audio in scene view and hear it fine.

If anyone has had this problem or know what the issue is any help is much appreciated.

Don’t shoot me down for asking such remedial questions, but…

  • Are you sure you have dragged an audio file to the loop field in the AudioSource Inspector?
  • Have you auditioned the sound into the editor to see if you can hear anything?
  • Have you tried playing it at full volume?
  • Does your scene have any other audio components, and do they play Ok?
  • Try setting your sound to 2D only and see if you can hear something then.

If all of the above have been checked, and it still fails, step slowly away from the computer…

Grab a few beers and take some down time, when you return to your PC the problem will probably be staring you right in the face :wink:

Thanks for the reply.

I sent a bug report and found a small mis-type in the script involving the awake function. The problem is I have updated the script to fix the error and the problem is still persisting. I don’t know if the “stats” tab has any useful information but the audio level is at -74.8 dB. I’m assuming this is the default audio level for no audio sources in a scene, but the game object is there, and the awake function is now correct.

It’s quite hard to help at this point without seeing your project. Can you throw it up online somewhere?