Feature request: public method to register Unity events on ActionButton

ChristianWiele

Active member
Hi,

I am using Master Audio to trigger sounds when a button is clicked. Mater Audio provides an integration for standard Unity buttons. For the UIS ActionButton I can trigger the sound through adding a listener to the OnClick event of the ActionButton. Unfortunately, there is no public method available to register for the event (the standard Unity button provides this). So, I have to manually add the event listener on each ActionButton. Can you provide a public method for this? This would make life much easier.

Thanks, Christian
 
The OnSubmitE event is the one you are looking for.
1632313907634.png
These are all the public events invoked by the Action button. It uses simple C# events instead of the UnityEvent. To register to them you can use:
Code:
actionButton.OnSumbitE += HandleOnClick;
Where handleOnClick is the method you want to be called when the event is invoked.

If that's not what you are looking for let me know
 
Top