📜  unity gameobject.find 不起作用 - C# 代码示例

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

代码示例1
public GameObject Object;

    void Start()
    {
        (Object) = GameObject.Find("Object"); // This needs to be the same name as the object you want to reference
    }
// Problems you might encounter
      // 1. You didn't add the public GameObject
      // 2. GameObject.Find isn't in void Start()
      // 3. The word in ("") isn't the same name as the Object you want to reference