Answers for "unity gameobject.find not working"

C#
2

unity gameobject.find not working

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
Posted by: Guest on February-23-2021

Code answers related to "unity gameobject.find not working"

C# Answers by Framework

Browse Popular Code Answers by Language