mirror of
https://github.com/Steffo99/better-tee.git
synced 2024-11-22 15:24:18 +00:00
19 lines
464 B
C#
19 lines
464 B
C#
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
namespace BetterTee.Form {
|
||
|
[RequireComponent(typeof(Button))]
|
||
|
public class FormButtonUnity : FormEvent {
|
||
|
protected Button buttonComponent;
|
||
|
|
||
|
private void Start() {
|
||
|
buttonComponent = GetComponent<Button>();
|
||
|
buttonComponent.onClick.AddListener(ButtonComponent_OnClick);
|
||
|
}
|
||
|
|
||
|
private void ButtonComponent_OnClick() {
|
||
|
TriggerEvent();
|
||
|
}
|
||
|
}
|
||
|
}
|