collision sounds unity code example
Example 1: how to play sound in unity
public AudioSource Jump;
Jump.Play();
Example 2: play sound on collision unity c#
void Start ()
{
saw = GameObject.FindObjectOfType<AudioSource>();
}
void Update ()
{
}
void OnCollisionEnter(Collision col)
{
if(col.gameObject)
{
saw.Play();
Debug.Log("Nurrrr");
}
}