Hello forumers,
I have just started playing around with an audio manager in Unity and am still very new to scripting for playing audio files.
The problem I am having currently is that my Audio sound continues to repeat itself before it can even end. This is because I am putting it inside update, although I need it to play once when my raycast collides with an object. I am not sure which function is best for this type of encounter. Ideally, I would like for the sound to play when my ray first collides, and doesnt play again unless my ray goes off the object and back on.
I just have no idea how I would begin this.
Thank you for helping,