[Solved] Boing sound not playing

Hello everyone, I am not sure why but every time I play my game the “Crack” sound works but the “Boing” does not. I have taken a screen shot of both the code as well as the inspector for the prefabbed ball.

I am using Unity 4.6.9

I have tried adjusting the volume but it is already at maximum.

I went over and over the code, I can not figure out why it is not working.

I used a different audio clip from freesounds, I am wondering if that could be the problem?

Does anyone know if I can turn the volume up n the clip? Maybe it is playing but I just can’t hear it? Any help is greatly appreciated!

Also, real quick, I noticed that the ONCollisionEnter2d (Collision2d collision) was incorrect, in my original code I was missing the 2d but I fixed that and the problem still persists.

Here is my code as well as a shot of the inspector:

Hi @Simone_Dowsett,

Believe me, after you’ve played tested for a few hours you’ll be glad you can’t hear it :wink:

If you want to hear it though, you just need to correct the spelling of the OnCollisionEnter2d() method to OnCollisionEnter2D() - these are case sensitive. Also, you need to have the correct Type in the brackets;

OnCollisionEnter2D(Collision2D coll)

Hope this helps.

See also;

1 Like

Thanks Rob! What a silly mistake! I am shaking my head, I can’t believe I missed that! I even talked it over with my Rubber Duck and missed the error. Thanks again for the help! I made the changes and it worked!

1 Like


You’re more than welcome. It happens to us all, code blindness :slight_smile:

Sounds like that Duck of yours needs a time out! :smiley:

Privacy & Terms