AddChild() 공개 메소드

public AddChild ( exUIElement, _element ) : void
_element exUIElement,
리턴 void
예제 #1
0
    // ------------------------------------------------------------------
    // Desc:
    // ------------------------------------------------------------------

    static void FindAndAddChildRecursively(exUIElement _el, Transform _trans)
    {
        foreach (Transform child in _trans)
        {
            exUIElement child_el = child.GetComponent <exUIElement>();
            if (child_el)
            {
                _el.AddChild(child_el);
                exUIElement.FindAndAddChild(child_el);
            }
            else
            {
                FindAndAddChildRecursively(_el, child);
            }
        }
    }
예제 #2
0
 // ------------------------------------------------------------------
 // Desc:
 // ------------------------------------------------------------------
 static void FindAndAddChildRecursively( exUIElement _el, Transform _trans )
 {
     foreach ( Transform child in _trans ) {
         exUIElement child_el = child.GetComponent<exUIElement>();
         if ( child_el ) {
             _el.AddChild (child_el);
             exUIElement.FindAndAddChild (child_el);
         }
         else {
             FindAndAddChildRecursively( _el, child );
         }
     }
 }