Quantcast
Channel: Answers by "TheCatProblem"
Viewing all articles
Browse latest Browse all 28

Answer by TheCatProblem

$
0
0
One way to accomplish this would be to simply have a boolean variable that gets checked before playing the sound and set when the sound plays. Something like this: bool soundHasPlayed = false; function OnCollisionEnter(){ if (!soundHasPlayed){ audio.Play(); soundHasPlayed = true; } }

Viewing all articles
Browse latest Browse all 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>