How to play music or sound effect if my player touching object?
my sound always autoplay when i start the game.
How to play music or sound effect if my player touching object?
my sound always autoplay when i start the game.
You could do something like this:
Take a look here: Unity - Scripting API: Collider.OnCollisionEnter(Collision)
function OnCollisionEnter(collision : Collision) { audio.Play(); }