📌  相关文章
📜  如何统一查找游戏对象 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:10.610000             🧑  作者: Mango

代码示例2
GameObject sphere = Gameobject.Find("Player");
// above code will search whole scene for the gameobject named "Player"
//
GameObject sphere = Gameobject.Find("/Player"); 
//above code will search the gameobject named "Player" but this gameobject cannot be a child

GameObject sphere = Gameobject.Find("/player/gun");
//above code will search the gun gameobject which must be the child of Player 
// and player must not be the child of any other.