源码学习网
摘要: //大写开头GameObject 与gameObject的区别 //大写开头GameObject 是类,是class, 是苹果类,apples //小写开头gameObject 具体的个体,是对象,是这个苹果,apple //查找游戏物体GameObject GameObject.Find("apple");/... 阅读全文
posted @ 2018-03-03 18:34 马丁啉 阅读(4593) 评论(0) 推荐(0)
摘要: //先引用 GameObject myApple = GameObject.Find("apple"); myApple.GetComponent<Button>(); //后添加 myApple.AddComponent<Button>(); //用完销毁 Destroy(myApple); 阅读全文
posted @ 2018-03-03 18:00 马丁啉 阅读(2376) 评论(0) 推荐(0)