Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Nicky on January 15, 2014, 04:44:04 AM
-
I have UIPlaySound configured to play different audio for OnMouseOver and OnClick.
Both are played when I click on the button, which should not happen as to the user, the mouse did not go away from the button.
Is there any specific setting or code that is required to ensure only the OnClick audio plays when I click the button?
-
NGUI sends a "mouse over" event after click assuming the mouse is still over the button, which is what triggers your sound. I would advise you to create a simple custom script instead of using two UIPlaySound scripts. Include both audio clip references and trigger only one of them as needed.
-
Thanks! Have done my own class for that already. Just curious why the default behavior of UIPlaySound re-triggers the onmouseover audio when technically the mouse did not leave the button.
-
Just an old issue that never got fixed because no one brought it up. I'll have it fixed in the next release.