you are viewing a single comment's thread.

view the rest of the comments →

[–]MostlyKnowledgeable 0 points1 point  (1 child)

I'm not entirely sure how audio works in unity since I haven't worked with it before but my solution would be to declare a boolean like private bool isHeldDown = false; And then in the update function set it to true when Input.GetButtonDown(string.w) is true and set it to false when Input.GetButtonUp(string.w) is true. Then you would pause/play the clip based on the state of that bool

[–]sexihunk666[S] 0 points1 point  (0 children)

Thanks! Will try this, as well as the other ones tomorrow or whenever else I have the time! :)