Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

finding parent in a prefab

Discussion in 'Scripting' started by juliang, May 31, 2011.

  1. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    98
    Given that I have a reference to a node somewhere in the hierarchy of a prefab instance, how do I track upwards to the parent node? Seems like it should be easy.
     
  2. svenskefan

    svenskefan

    Joined:
    Nov 26, 2008
    Posts:
    282
    Transform.root
     
  3. juliang

    juliang

    Joined:
    Nov 25, 2008
    Posts:
    98
    Tak for det.
    I figured it was something simple somewhere.