unity 3d中通过名称或Tag来访问游戏对象有什么区别
求大神解答啊
function Start()
{
//通过名称查找
var go = GameObject.Find("SomeGuy");
go.transform.Translate(0, 1, 0);
//通过tag查找
var player = GameObject.FindWithTag("Player");
player .transform.Translate(0, 1, 0);
}
芜湖不芜
慕娘9325324
相关分类