Hi Guys,
I am trying to make my volume slider play a sound AFTER the slider is adjusted and the mouse is released (think Windows OS volume slider).
Here is my C#:
public void PlayVolumeCheck(){
if (Input.GetMouseButtonUp(0)) {
Vector3 temp = new Vector3 (9f, 5f);
Debug.Log ("ping!");
AudioSource.PlayClipAtPoint (paddleHit, temp , 2f);
}
}
I have tested this by adding it to the Update Function and it works fine ( I click anywhere on the game screen and it pings after releasing the mouse button).
If I remove the If statement and just have it playing the sound, it works but it plays the sound every time the slider value changes, so it sounds very bad.
Thanks in advance.