小功能丨Button:Unity獲取Button組件的自身屬性、修改Button顏色

一、Unity獲取Button組件的自身屬性 將下面方法寫在Button的點擊事件裏,即可傳出當前button所依賴物體的名稱 var buttonSelf = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject; Debug.Log(buttonSelf.transform.name);   二、修改But
相關文章
相關標籤/搜索