Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Undocumented Command

Discussion in 'Scripting' started by User340, May 7, 2007.

  1. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    I found the command "GetChild()" on the FPS Tutorial, and I searched for it on the scripting reference, and nothing came up. I tried using it in a seprate script in a different project and it deffinetaly is a Unity command. It appears it was left out of the scripting refrence. Also in unitron it doesn't show up as a command. Does anyone know of other undocumented commands?

    thanks
     
  2. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,267
    Sometimes parts of the API get deprecated when a better way to implement them is discovered. These functions are still around for compatibility reasons but I believe have been removed from the reference to encourage use of the latest methodologies.
     
  3. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Okay thanks, what is the new command for GetChild ()?
     
  4. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,267
    I can't look at the FPS tut right now, but if GetChild was meant to return a certain child of a transform, the new method would be to use Transform.Find.
     
  5. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Thanks