I’m having problems with the audio clips. When I click the “Play” button on the audio clips (in the inspector), Unity refuses to play it. Nothing happens. The same goes for playing the clip through code.
audioSource.Play() does not play the clip even though there is an audio clip.
Right after calling audioSource.Play() I call Debug.Log(audioSource.isPlaying), which is always false.
This has nothing to do with the audio itself. Double clicking it will play the audio in a different application perfectly fine.
I have restarted Unity multiple times, re-imported the audio clip and restarted the PC.
And it still doesn’t work. Please help!!!
The audio clip is in a WAV-format.
According to Unity docs, The audio file formats that Unity can import are .aif , .wav , .mp3 , and .ogg.
It should still work.
I don’t know in which course or lecture you are but are there any error messages in your console when you try to play the sound clip? Try to play the clip outside Unity.
I am able to play all audio clips outside of Unity, so there is nothing wrong with the audio clips.
There are also no errors popping up.
Here you can see whats happening. I’m clicking play, but the audio does not play. There isn’t even a white line to indicate that it’s playing.
audioSource.Play() does not work either (It is called, but nothing happens).
Could you please upload your project to GitHub without the Temp and Library folder and share a link to the public repository here? I’d like to take a look into this.
I’ve just checked your project and noticed that your project is not part of any of our courses. (Please correct me if I’m wrong.) Usually, we cannot help with projects that are outside the scope of our courses. I made an exception for you, though, spent a couple of minutes with your project and typed “unity audio not working” into my preferred search engine. A few seconds later, I found a potential solution. Go to Edit > Project Settings > Audio and make sure that “Disable Audio” is not enabled. That fixed it for me in Unity 2021.1.16f1.
I remember installing something called FMOD for Unity, where you could create custom music and audio. Then you could implement them to you Unity project. I didn’t really understand it so i deleted the folder where the package was. Before i could use it, there was a setup popup, where i had to disable built-in audio for Unity. I thought it just removed the audio listener and audio sources, because it didn’t say anything about the audio settings.
Also sorry, this wasn’t meant to be project-specific, but i was really frustrated and needed help. I know there is Unity Answers and Stack Overflow, but I don’t feel experienced enough to go to these websites. Thanks!
That’s fine. Please feel to ask everything you want about Unity and C# here. I just wanted to mention that we teaching assistents usually don’t have time to help with problems outside the GameDev.tv courses, so you don’t expect too much of us just because I replied here.