0
Answered

How to use on button click event for a specific button

Gadget Kk 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 1

Hi Everyone,

Wanting to know how to use the on button click event properly (or if there is a tutorial out there).


I have a Main Menu object with 3 child objects representing the buttons shown on that menu, one of them is a Play button. So if I add the on button click event, how to i assign it to which button to be listening to?


Thanks in advance.

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Answered

Hi Gadget,

You have two options:

  1. Create your flow machine on the Play Button itself.
  2. Create your flow machine on the Main Menu object, make sure it's an Embed graph. This will allow you to drag the Play Button object in the target field of the On Button Click event (its first and only input).