FairyGUI.GComponent.RemoveChild C# (CSharp) Method

RemoveChild() public method

Removes a child from the component. If the object is not a child, nothing happens.
public RemoveChild ( GObject child ) : GObject
child GObject A child object
return GObject
        public GObject RemoveChild(GObject child)
        {
            return RemoveChild(child, false);
        }

Same methods

GComponent::RemoveChild ( GObject child, bool dispose ) : GObject

Usage Example

    static int RemoveChild(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.GComponent), typeof(FairyGUI.GObject)))
            {
                FairyGUI.GComponent obj  = (FairyGUI.GComponent)ToLua.ToObject(L, 1);
                FairyGUI.GObject    arg0 = (FairyGUI.GObject)ToLua.ToObject(L, 2);
                FairyGUI.GObject    o    = obj.RemoveChild(arg0);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(FairyGUI.GComponent), typeof(FairyGUI.GObject), typeof(bool)))
            {
                FairyGUI.GComponent obj  = (FairyGUI.GComponent)ToLua.ToObject(L, 1);
                FairyGUI.GObject    arg0 = (FairyGUI.GObject)ToLua.ToObject(L, 2);
                bool             arg1    = LuaDLL.lua_toboolean(L, 3);
                FairyGUI.GObject o       = obj.RemoveChild(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.GComponent.RemoveChild"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of FairyGUI.GComponent::RemoveChild