using UnityEngine;
public class Menu : MonoBehaviour
{
private UIButton MyButton;
private void Awake()
{
MyButton = GameObject.Find("MyButton").GetComponent<UIButton>();
}
private void Start()
{
EventDelegate.Set(MyButton.onClick, delegate () { Test(); });
}
private void Test()
{
Debug.Log("test button action");
}
}