添加事件的按钮
public Button startBtn;
使用onClick添加事件
startBtn.onClick.AddListener(startGame);
事件函数
public void startGame()
{
Debug.Log("游戏开始!");
}
添加事件的按钮
public Button startBtn;
使用onClick添加事件
startBtn.onClick.AddListener(startGame);
事件函数
public void startGame()
{
Debug.Log("游戏开始!");
}