Hi all. I'm working out of NGUI version 2.7.0 (waiting until the next new project before we make the jump to 3.0) and I'm having a bit of trouble with NGUITools.PlaySound(). I can't hear the sound.
- I logged out the code. It is executing that line and the audio clip is not null.
- NGUITools.soundVolume is logging out to be 1.
- I have a camera in the scene with an Audio Listener. It is active.
- The sound I want to play is 2D, and it's the standard NGUI "Tap" sound at this point, though that will change later.
- I can play and hear sounds that I assign to an AudioSource, so I know that my scene can play audio.
Not really sure what could be going on. I think I've covered all my "derp" bases here, but please correct me if I'm missing something obvious. My code is simply:
public AudioClip tapSound; // Confirmed set in editor
void OnClick(){
Debug.LogWarning(NGUITools.soundVolume); // This does log out, so I know the code is executing.
NGUITools.PlaySound(tapSound, 1);
}
Thanks a bunch!
EDIT: I said 2.2.7 the first time I posted this. I meant 2.7.0.