play audio trough collision unity 2020 code example
Example: 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");
}
}