Search Unity

How to query each children under me?

Discussion in 'Scripting' started by iphoneonly118, Feb 24, 2010.

  1. iphoneonly118

    iphoneonly118

    Joined:
    Nov 30, 2009
    Posts:
    96
    Hi,
    I have one gameobj, there are children under it, when the code running, the children number is dynamic. I want to query each of my children then do something.
    I only find there's one childCount under Transform class, but I didn't find some collection interface which can let me do "foreach".
    Does anyone know about this?
    Thanks in advance.
     
  2. FenrirWolf

    FenrirWolf

    Joined:
    Feb 10, 2010
    Posts:
    37
  3. iphoneonly118

    iphoneonly118

    Joined:
    Nov 30, 2009
    Posts:
    96
    Great! Thanks a lot:)