unity中代碼添加按鈕事件的兩種方案

做爲一個程序員都但願項目用代碼控制,因此有時候用代碼來控制點擊事件仍是有必要的。程序員 第一種方案,就是雨鬆momo老師的方案 第二種,直接上代碼web ButtonObject = GameObject.Find ("Button").GetComponent<Button>(); ButtonObject.onClick.AddListener (delegate {
相關文章
相關標籤/搜索