So I am making a game where the character would collide with a square then bounce off it. However I wanted to add a AudioSource for the bounce effect. I am getting 0 errors in the Console window however my code isn’t working.
#pragma strict
function OnCollisionEnter2D (collision : Collision2D)
{
audio.Play();
}