Similar to having an on mouse over and on mouse exit timer on a trigger (ie to create a button down that keeps playing a sound as long as the player is holding down the button and when letting go it stops) - can that be done with a gui button?
So far I can start a sound and stop it when player press button again - but i want to have it when letting go. (I'm using AC gui)
Any direction would be much appreciated.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Your title mentions holding the button down - are you looking to have a sound play the whole time, or only when letting go?
For pretty much any custom UI behaviour, I'd recommend using Unity UI. However, when using AC menus you can hook into the OnMouseOverMenu event to work out if the pointer is over a particular element:
Thanks Chris.
Yes, it's when holding down a sound will play - and when letting go it will stop.
(When pressing a car horn)
Something more like this should do it: