Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

GameObject.Find returning non-existent objects

Discussion in 'Scripting' started by Rodolfo-Rubens, Sep 22, 2013.

  1. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    Everytime I start to use mecanim, all my scripts that look for my any object using findwithtag/find and etc starts to return a non-existent (I'd say "ghost" =P) objects, I debugged in many ways and the find method is returning an object that doesn't exist at all, when I double click the gameobject reference in the inspector it selects a gameobject that can't have it's values changed, also, it isn't on the scene, it isn't in the project folders and it, it has a (Clone) on it's name has an animator attached to it and that's all ... Does someone already faced any problem like this one?
     
  2. Alexrose12345

    Alexrose12345

    Joined:
    Jul 15, 2012
    Posts:
    6
    I just had this exact problem. Restarted Unity and it disappeared. Also via debug found the positions were 0,0,0, nothing was there.
     
  3. neph_2

    neph_2

    Joined:
    Jul 23, 2013
    Posts:
    3
    I am having same problems, every few compilation GameObject.Find is returning somehow same objects that were in previous played scene, very strange, cant find any solution..