Question by
MrGoldenPorkchop · Apr 22, 2019 at 11:47 AM ·
c#audioaudiosource
Audio help
Hi. I'm trying to make sound when my character is moving (in this case, it's a RC car). I'm using C# and I want to make it play sound when I hold down key (I'm using GetButtonDown) and it works...It plays a sound. But when I use GetButtonUp to stop sound it doesn't work. It continues to play until whole sound effect is over. I just want to it to make sound while I'm moving and to stop sound when I release it. Can anyone help? Or write a script? Thanks :) And btw I'm not sure if the problem is in audio (because it's 5-7 seconds long)
Comment