Emit Button Click Event

How can I trigger the click event of a button component from code. I understand your confusion, I just need to do it this way. :sweat_smile: :sweat_smile: :sweat_smile:
I’m using Cocos Creator version 3.8.1.

https://docs.cocos.com/creator/manual/en/ui-system/components/editor/button.html

check call back on script. Most of what you ask could simply be google

I’ve found this before, but it’s not what I need.

you can try it Cocos Creator API

1 Like

Your answer led me to the solution I needed. Thank you! :sweat_smile: :grinning: :wink: