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

            if (count == 3)
            {
                Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
                string arg1 = ToLua.CheckString(L, 3);
                Framework.SyncAssetProxy o = obj.LoadAssetSync(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 4)
            {
                Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
                string arg1 = ToLua.CheckString(L, 3);
                bool   arg2 = LuaDLL.luaL_checkboolean(L, 4);
                Framework.SyncAssetProxy o = obj.LoadAssetSync(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Framework.ResourceMgr.LoadAssetSync"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int Init(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
         obj.Init();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
    static int LoadAssetProxy(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
                string arg1 = ToLua.CheckString(L, 3);
                Framework.AsyncAssetProxy o = obj.LoadAssetProxy(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 4)
            {
                Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
                string arg1 = ToLua.CheckString(L, 3);
                bool   arg2 = LuaDLL.luaL_checkboolean(L, 4);
                Framework.AsyncAssetProxy o = obj.LoadAssetProxy(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 5)
            {
                Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
                string arg1 = ToLua.CheckString(L, 3);
                System.Action <float> arg2 = (System.Action <float>)ToLua.CheckDelegate <System.Action <float> >(L, 4);
                bool arg3 = LuaDLL.luaL_checkboolean(L, 5);
                Framework.AsyncAssetProxy o = obj.LoadAssetProxy(arg0, arg1, arg2, arg3);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Framework.ResourceMgr.LoadAssetProxy"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int CancleAllProxy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
         System.Collections.Generic.IEnumerator <float> o = obj.CancleAllProxy();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int AddProxy(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
         Framework.AssetProxy  arg0 = (Framework.AssetProxy)ToLua.CheckObject <Framework.AssetProxy>(L, 2);
         obj.AddProxy(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int UnloadObject(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
         UnityEngine.Object    arg0 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 2);
         obj.UnloadObject(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int UnloadUnusedAssets(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
         System.Action <UnityEngine.AsyncOperation> arg0 = (System.Action <UnityEngine.AsyncOperation>)ToLua.CheckDelegate <System.Action <UnityEngine.AsyncOperation> >(L, 2);
         obj.UnloadUnusedAssets(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int UnloadUnitySceneMemory(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
         Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
         UnityEngine.Object    arg1 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 3);
         obj.UnloadUnitySceneMemory(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int GameGC(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.GameGC");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 1);
            Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            obj.GameGC();
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int get_MAX_LOAD_TIME(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Framework.ResourceMgr obj = (Framework.ResourceMgr)o;
            float ret = obj.MAX_LOAD_TIME;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index MAX_LOAD_TIME on a nil value"));
        }
    }
    static int get_ResourceMgrInitHandler(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Framework.ResourceMgr             obj = (Framework.ResourceMgr)o;
            Framework.ManagerInitEventHandler ret = obj.ResourceMgrInitHandler;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ResourceMgrInitHandler on a nil value"));
        }
    }
    static int set_ResourceMgrInitHandler(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Framework.ResourceMgr             obj  = (Framework.ResourceMgr)o;
            Framework.ManagerInitEventHandler arg0 = (Framework.ManagerInitEventHandler)ToLua.CheckDelegate <Framework.ManagerInitEventHandler>(L, 2);
            obj.ResourceMgrInitHandler = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ResourceMgrInitHandler on a nil value"));
        }
    }
    static int DestroyInstantiateObject(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.DestroyInstantiateObject");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            UnityEngine.Object    arg0 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 2);
            obj.DestroyInstantiateObject(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int UnloadUnusedAssets(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.UnloadUnusedAssets");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            System.Action         arg0 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 2);
            obj.UnloadUnusedAssets(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int CancleAllProxy(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.CancleAllProxy");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 1);
            Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            System.Collections.Generic.IEnumerator <float> o = obj.CancleAllProxy();
            ToLua.PushObject(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int AddRemoveProxy(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.AddRemoveProxy");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            Framework.ResourceMgr   obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            Framework.AbsAssetProxy arg0 = (Framework.AbsAssetProxy)ToLua.CheckObject <Framework.AbsAssetProxy>(L, 2);
            obj.AddRemoveProxy(arg0);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int LoadSceneAsync(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                obj.LoadSceneAsync(arg0);
                return(0);
            }
            else if (count == 3)
            {
                Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                System.Action <float> arg1 = (System.Action <float>)ToLua.CheckDelegate <System.Action <float> >(L, 3);
                obj.LoadSceneAsync(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                System.Action <UnityEngine.SceneManagement.Scene> arg1 = (System.Action <UnityEngine.SceneManagement.Scene>)ToLua.CheckDelegate <System.Action <UnityEngine.SceneManagement.Scene> >(L, 3);
                System.Action <float> arg2 = (System.Action <float>)ToLua.CheckDelegate <System.Action <float> >(L, 4);
                obj.LoadSceneAsync(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Framework.ResourceMgr.LoadSceneAsync"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Ejemplo n.º 18
0
    static int UnloadUnitySceneMemory(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.UnloadUnitySceneMemory");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 3);
            Framework.ResourceMgr obj  = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            Framework.AssetType   arg0 = (Framework.AssetType)ToLua.CheckObject(L, 2, typeof(Framework.AssetType));
            UnityEngine.Object    arg1 = (UnityEngine.Object)ToLua.CheckObject <UnityEngine.Object>(L, 3);
            obj.UnloadUnitySceneMemory(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int LoadResourceProxy(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.LoadResourceProxy");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            Framework.ResourceMgr obj = (Framework.ResourceMgr)ToLua.CheckObject <Framework.ResourceMgr>(L, 1);
            string arg0 = ToLua.CheckString(L, 2);
            Framework.ResourceAssetProxy o = obj.LoadResourceProxy(arg0);
            ToLua.PushObject(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
	static int set_ResourceMgrInitHandler(IntPtr L)
	{
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.ResourceMgrInitHandler");
#endif
		object o = null;

		try
		{
			o = ToLua.ToObject(L, 1);
			Framework.ResourceMgr obj = (Framework.ResourceMgr)o;
			Framework.ManagerInitEventHandler arg0 = (Framework.ManagerInitEventHandler)ToLua.CheckDelegate<Framework.ManagerInitEventHandler>(L, 2);
			obj.ResourceMgrInitHandler = arg0;
			return 0;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e, o, "attempt to index ResourceMgrInitHandler on a nil value");
		}
	}
    static int get_LOAD_ASSET_PRECENT(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.LOAD_ASSET_PRECENT");
#endif
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Framework.ResourceMgr obj = (Framework.ResourceMgr)o;
            float ret = obj.LOAD_ASSET_PRECENT;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index LOAD_ASSET_PRECENT on a nil value"));
        }
    }
Ejemplo n.º 22
0
    static int get_ResourceMgrInitHandler(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.ResourceMgrInitHandler");
#endif
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Framework.ResourceMgr             obj = (Framework.ResourceMgr)o;
            Framework.ManagerInitEventHandler ret = obj.ResourceMgrInitHandler;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index ResourceMgrInitHandler on a nil value"));
        }
    }
    static int get_LuaAssetBundle(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("Framework.ResourceMgr.LuaAssetBundle");
#endif
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Framework.ResourceMgr   obj = (Framework.ResourceMgr)o;
            UnityEngine.AssetBundle ret = obj.LuaAssetBundle;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index LuaAssetBundle on a nil value"));
        }
    }
    static int _CreateFramework_ResourceMgr(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

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