exUIElement.AddChild C# (CSharp) Method

AddChild() public method

public AddChild ( exUIElement, _element ) : void
_element exUIElement,
return void
    public void AddChild( exUIElement _element )
    {
        _element.parent = this;
        children.Add(_element);
    }

Usage Example

Example #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);
            }
        }
    }
All Usage Examples Of exUIElement::AddChild