摘要:
Unity中提供了五种获取对象的方法1.通过对象名称(Find)public static GameObject Find(string name);通过名字寻找对象并返回它,只返回active GameObject,如果没有GameObject,则返回null。如果名称内包含“/”字符,会当做是h 阅读全文
摘要:
1 void Awake () 2 { 3 //获取需要监听的按钮对象 4 GameObject button = GameObject.Find("UI Root (2D)/Camera/Anchor/Panel/LoadUI/MainCommon/Button"); 5 //设置这个按... 阅读全文