京城遊戲人-Day13: 獲取被點擊的 Button 以及其上的文字內容
-
- 作者:大銳哥
- 地址:http://blog.csdn.net/prevention
-
獲取被點擊的 button:
var button = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject
獲取 button 上的文字內容:
Debug.Log(button.GetComponentInChildren<Text>().text);
-
- 作者:大銳哥
- 地址:http://blog.csdn.net/prevention
-