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

            if (count == 1)
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.Networking.UnityWebRequest o = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(arg0);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 2)
            {
                string arg0 = ToLua.CheckString(L, 1);
                uint   arg1 = (uint)LuaDLL.luaL_checknumber(L, 2);
                UnityEngine.Networking.UnityWebRequest o = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.CachedAssetBundle, uint>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.CachedAssetBundle arg1 = StackTraits <UnityEngine.CachedAssetBundle> .To(L, 2);

                uint arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.Networking.UnityWebRequest o = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.Hash128, uint>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.Hash128 arg1 = StackTraits <UnityEngine.Hash128> .To(L, 2);

                uint arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.Networking.UnityWebRequest o = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <uint, uint>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                uint   arg1 = (uint)LuaDLL.lua_tonumber(L, 2);
                uint   arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.Networking.UnityWebRequest o = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Networking.UnityWebRequest.GetAssetBundle"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #2
0
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.CachedAssetBundle o;
         if (argc == 3)
         {
             System.String a1;
             checkType(l, 2, out a1);
             UnityEngine.Hash128 a2;
             checkValueType(l, 3, out a2);
             o = new UnityEngine.CachedAssetBundle(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc <= 2)
         {
             o = new UnityEngine.CachedAssetBundle();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #3
0
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.CachedAssetBundle o;
         System.String a1;
         checkType(l, 2, out a1);
         UnityEngine.Hash128 a2;
         checkValueType(l, 3, out a2);
         o = new UnityEngine.CachedAssetBundle(a1, a2);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #4
0
    static int LoadFromCacheOrDownload(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(UnityEngine.Hash128)))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.Hash128 arg1 = (UnityEngine.Hash128)ToLua.ToObject(L, 2);
                UnityEngine.WWW     o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(int)))
            {
                string          arg0 = ToLua.ToString(L, 1);
                int             arg1 = (int)LuaDLL.lua_tonumber(L, 2);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(UnityEngine.CachedAssetBundle), typeof(uint)))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.CachedAssetBundle arg1 = (UnityEngine.CachedAssetBundle)ToLua.ToObject(L, 2);
                uint            arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(UnityEngine.Hash128), typeof(uint)))
            {
                string arg0 = ToLua.ToString(L, 1);
                UnityEngine.Hash128 arg1 = (UnityEngine.Hash128)ToLua.ToObject(L, 2);
                uint            arg2     = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.WWW o        = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(int), typeof(uint)))
            {
                string          arg0 = ToLua.ToString(L, 1);
                int             arg1 = (int)LuaDLL.lua_tonumber(L, 2);
                uint            arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1, arg2);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.WWW.LoadFromCacheOrDownload"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #5
0
 public static bool MarkAsUsed(CachedAssetBundle cachedBundle)
 {
     if (string.IsNullOrEmpty(cachedBundle.name))
     {
         throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
     }
     return(Caching.MarkAsUsed("", cachedBundle.name, cachedBundle.hash));
 }
    static int QPYX_GetAssetBundle_YXQP(IntPtr L_YXQP)
    {
        try
        {
            int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
            if (QPYX_count_YXQP == 1)
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.Networking.UnityWebRequest QPYX_o_YXQP = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(QPYX_arg0_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 2)
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                uint   QPYX_arg1_YXQP = (uint)LuaDLL.luaL_checknumber(L_YXQP, 2);
                UnityEngine.Networking.UnityWebRequest QPYX_o_YXQP = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.CachedAssetBundle, uint>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.CachedAssetBundle QPYX_arg1_YXQP = StackTraits <UnityEngine.CachedAssetBundle> .To(L_YXQP, 2);

                uint QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3);
                UnityEngine.Networking.UnityWebRequest QPYX_o_YXQP = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.Hash128, uint>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.Hash128 QPYX_arg1_YXQP = StackTraits <UnityEngine.Hash128> .To(L_YXQP, 2);

                uint QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3);
                UnityEngine.Networking.UnityWebRequest QPYX_o_YXQP = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <uint, uint>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                uint   QPYX_arg1_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 2);
                uint   QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3);
                UnityEngine.Networking.UnityWebRequest QPYX_o_YXQP = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.Networking.UnityWebRequest.GetAssetBundle"));
            }
        }
        catch (Exception e_YXQP)                {
            return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
        }
    }
Пример #7
0
        public static bool IsVersionCached(CachedAssetBundle cachedBundle)
        {
            bool flag = string.IsNullOrEmpty(cachedBundle.name);

            if (flag)
            {
                throw new ArgumentException("Input AssetBundle name cannot be null or empty.");
            }
            return(Caching.IsVersionCached("", cachedBundle.name, cachedBundle.hash));
        }
Пример #8
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CachedAssetBundle o;
         System.String a1;
         checkType(l, 2, out a1);
         UnityEngine.Hash128 a2;
         checkValueType(l, 3, out a2);
         o = new UnityEngine.CachedAssetBundle(a1, a2);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #9
0
    static int LoadFromCacheOrDownload2(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            string arg0 = ToLua.ToString(L, 1);
            UnityEngine.CachedAssetBundle arg1 = StackTraits <UnityEngine.CachedAssetBundle> .To(L, 2);

            var o = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1);
            ToLua.PushObject(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #10
0
 public static void ResetNoBackupFlag(CachedAssetBundle cachedBundle)
 {
 }
Пример #11
0
 public static WWW LoadFromCacheOrDownload(string url, CachedAssetBundle cachedBundle, uint crc = 0)
 {
     return(new WWW(url, cachedBundle.name, cachedBundle.hash, crc));
 }
    static int QPYX_LoadFromCacheOrDownload_YXQP(IntPtr L_YXQP)
    {
        try
        {
            int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
            if (QPYX_count_YXQP == 2 && TypeChecker.CheckTypes <UnityEngine.Hash128>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.Hash128 QPYX_arg1_YXQP = StackTraits <UnityEngine.Hash128> .To(L_YXQP, 2);

                UnityEngine.WWW QPYX_o_YXQP = UnityEngine.WWW.LoadFromCacheOrDownload(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 2 && TypeChecker.CheckTypes <UnityEngine.CachedAssetBundle>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.CachedAssetBundle QPYX_arg1_YXQP = StackTraits <UnityEngine.CachedAssetBundle> .To(L_YXQP, 2);

                UnityEngine.WWW QPYX_o_YXQP = UnityEngine.WWW.LoadFromCacheOrDownload(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 2 && TypeChecker.CheckTypes <int>(L_YXQP, 2))
            {
                string          QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                int             QPYX_arg1_YXQP = (int)LuaDLL.lua_tonumber(L_YXQP, 2);
                UnityEngine.WWW QPYX_o_YXQP    = UnityEngine.WWW.LoadFromCacheOrDownload(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.CachedAssetBundle, uint>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.CachedAssetBundle QPYX_arg1_YXQP = StackTraits <UnityEngine.CachedAssetBundle> .To(L_YXQP, 2);

                uint            QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3);
                UnityEngine.WWW QPYX_o_YXQP    = UnityEngine.WWW.LoadFromCacheOrDownload(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <int, uint>(L_YXQP, 2))
            {
                string          QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                int             QPYX_arg1_YXQP = (int)LuaDLL.lua_tonumber(L_YXQP, 2);
                uint            QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3);
                UnityEngine.WWW QPYX_o_YXQP    = UnityEngine.WWW.LoadFromCacheOrDownload(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else if (QPYX_count_YXQP == 3 && TypeChecker.CheckTypes <UnityEngine.Hash128, uint>(L_YXQP, 2))
            {
                string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
                UnityEngine.Hash128 QPYX_arg1_YXQP = StackTraits <UnityEngine.Hash128> .To(L_YXQP, 2);

                uint            QPYX_arg2_YXQP = (uint)LuaDLL.lua_tonumber(L_YXQP, 3);
                UnityEngine.WWW QPYX_o_YXQP    = UnityEngine.WWW.LoadFromCacheOrDownload(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
                ToLua.PushObject(L_YXQP, QPYX_o_YXQP);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.WWW.LoadFromCacheOrDownload"));
            }
        }
        catch (Exception e_YXQP)                {
            return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
        }
    }
Пример #13
0
    static int LoadFromCacheOrDownload(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.WWW.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <int>(L, 2))
            {
                string          arg0 = ToLua.CheckString(L, 1);
                int             arg1 = (int)LuaDLL.lua_tonumber(L, 2);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.Hash128>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.Hash128 arg1 = StackTraits <UnityEngine.Hash128> .To(L, 2);

                UnityEngine.WWW o = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.CachedAssetBundle>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.CachedAssetBundle arg1 = StackTraits <UnityEngine.CachedAssetBundle> .To(L, 2);

                UnityEngine.WWW o = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <int, uint>(L, 2))
            {
                string          arg0 = ToLua.CheckString(L, 1);
                int             arg1 = (int)LuaDLL.lua_tonumber(L, 2);
                uint            arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.Hash128, uint>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.Hash128 arg1 = StackTraits <UnityEngine.Hash128> .To(L, 2);

                uint            arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.CachedAssetBundle, uint>(L, 2))
            {
                string arg0 = ToLua.CheckString(L, 1);
                UnityEngine.CachedAssetBundle arg1 = StackTraits <UnityEngine.CachedAssetBundle> .To(L, 2);

                uint            arg2 = (uint)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.WWW o    = UnityEngine.WWW.LoadFromCacheOrDownload(arg0, arg1, arg2);
                ToLua.PushObject(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.WWW.LoadFromCacheOrDownload"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }