Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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
 
PREVIOUS NEXT
Tagged: #unity #working
ADD COMMENT
Topic
Name
6+9 =