filmov
tv
How to Add Click Method/Event on Button in Unity?

Показать описание
Hello everyone,
This video shows you how you can add a click event on button in Unity.
- Select the button in your hierarchy.
- There should be a "Button" component on the inspector.
- Add a new entry (+ symbol) in the "On Click()"-List.
- Now you have to drag the GameObject with the attached script into the new entry field (no-object),
- After that you will be able to select a function which will be called everytime you clicking the button.
This video shows you how you can add a click event on button in Unity.
- Select the button in your hierarchy.
- There should be a "Button" component on the inspector.
- Add a new entry (+ symbol) in the "On Click()"-List.
- Now you have to drag the GameObject with the attached script into the new entry field (no-object),
- After that you will be able to select a function which will be called everytime you clicking the button.