static int OnDestroy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         MainResourceMediator obj = (MainResourceMediator)ToLua.CheckObject(L, 1, typeof(MainResourceMediator));
         obj.OnDestroy();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int get_m_UIName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            MainResourceMediator obj = (MainResourceMediator)o;
            string ret = obj.m_UIName;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_UIName on a nil value" : e.Message));
        }
    }
    static int get_m_View(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            MainResourceMediator  obj = (MainResourceMediator)o;
            LuaInterface.LuaTable ret = obj.m_View;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_View on a nil value" : e.Message));
        }
    }
    static int set_m_UIName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            MainResourceMediator obj = (MainResourceMediator)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.m_UIName = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_UIName on a nil value" : e.Message));
        }
    }
    static int _CreateMainResourceMediator(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                MainResourceMediator obj = new MainResourceMediator();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: MainResourceMediator.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }