|
Post by Bryan on Aug 25, 2021 17:19:24 GMT
Currently, I have an "OnPointerHover" event set on my buttons (on the EventSounds component). I would like to change the sound group that "OnPointerHover" points to based on some internally tracked state (the interactivity of the button). What is the best way to go about this? First solution that comes to mind is to do it in code, i.e., remove the event from the EventSounds component and call "PlaySound" in code, but I'm wondering if there is a way to do this in the inspector.
Thanks
|
|
|
Post by DarkTonic Dev on Aug 25, 2021 23:38:06 GMT
I mean if you can place an EventSounds on the disabled component then it would only work when the game object is enabled, but you'd need to put another Event Sounds on another component that is disabled when the other is enabled. Not worth the effort.
So it would be easiest to just code that up yourself.
|
|