コード例 #1
0
    static int LoadAssetWithSubAssets(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.AssetBundle obj = (UnityEngine.AssetBundle)ToLua.CheckObject(L, 1, typeof(UnityEngine.AssetBundle));
                string arg0            = ToLua.CheckString(L, 2);
                UnityEngine.Object[] o = obj.LoadAssetWithSubAssets(arg0);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3)
            {
                UnityEngine.AssetBundle obj = (UnityEngine.AssetBundle)ToLua.CheckObject(L, 1, typeof(UnityEngine.AssetBundle));
                string               arg0   = ToLua.CheckString(L, 2);
                System.Type          arg1   = ToLua.CheckMonoType(L, 3);
                UnityEngine.Object[] o      = obj.LoadAssetWithSubAssets(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.AssetBundle.LoadAssetWithSubAssets"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #2
0
 static public int LoadAssetWithSubAssets(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.AssetBundle self = (UnityEngine.AssetBundle)checkSelf(l);
             System.String           a1;
             checkType(l, 2, out a1);
             var ret = self.LoadAssetWithSubAssets(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 3)
         {
             UnityEngine.AssetBundle self = (UnityEngine.AssetBundle)checkSelf(l);
             System.String           a1;
             checkType(l, 2, out a1);
             System.Type a2;
             checkType(l, 3, out a2);
             var ret = self.LoadAssetWithSubAssets(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #3
0
 static int QPYX_LoadAssetWithSubAssets_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 2)
         {
             UnityEngine.AssetBundle QPYX_obj_YXQP = (UnityEngine.AssetBundle)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.AssetBundle));
             string QPYX_arg0_YXQP            = ToLua.CheckString(L_YXQP, 2);
             UnityEngine.Object[] QPYX_o_YXQP = QPYX_obj_YXQP.LoadAssetWithSubAssets(QPYX_arg0_YXQP);
             ToLua.Push(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else if (QPYX_count_YXQP == 3)
         {
             UnityEngine.AssetBundle QPYX_obj_YXQP = (UnityEngine.AssetBundle)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.AssetBundle));
             string               QPYX_arg0_YXQP   = ToLua.CheckString(L_YXQP, 2);
             System.Type          QPYX_arg1_YXQP   = ToLua.CheckMonoType(L_YXQP, 3);
             UnityEngine.Object[] QPYX_o_YXQP      = QPYX_obj_YXQP.LoadAssetWithSubAssets(QPYX_arg0_YXQP, QPYX_arg1_YXQP);
             ToLua.Push(L_YXQP, QPYX_o_YXQP);
             return(1);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.AssetBundle.LoadAssetWithSubAssets"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
コード例 #4
0
    static int LoadAssetWithSubAssets(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.AssetBundle), typeof(string)))
        {
            UnityEngine.AssetBundle obj = (UnityEngine.AssetBundle)ToLua.ToObject(L, 1);
            string arg0            = ToLua.ToString(L, 2);
            UnityEngine.Object[] o = null;

            try
            {
                o = obj.LoadAssetWithSubAssets(arg0);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            ToLua.Push(L, o);
            return(1);
        }
        else if (count == 3 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.AssetBundle), typeof(string), typeof(System.Type)))
        {
            UnityEngine.AssetBundle obj = (UnityEngine.AssetBundle)ToLua.ToObject(L, 1);
            string               arg0   = ToLua.ToString(L, 2);
            System.Type          arg1   = (System.Type)ToLua.ToObject(L, 3);
            UnityEngine.Object[] o      = null;

            try
            {
                o = obj.LoadAssetWithSubAssets(arg0, arg1);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            ToLua.Push(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.AssetBundle.LoadAssetWithSubAssets");
        }

        return(0);
    }
コード例 #5
0
    static int LoadAssetWithSubAssets(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.AssetBundle.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                UnityEngine.AssetBundle obj = (UnityEngine.AssetBundle)ToLua.CheckObject <UnityEngine.AssetBundle>(L, 1);
                string arg0            = ToLua.CheckString(L, 2);
                UnityEngine.Object[] o = obj.LoadAssetWithSubAssets(arg0);
                ToLua.Push(L, o);
                return(1);
            }
            else if (count == 3)
            {
                UnityEngine.AssetBundle obj = (UnityEngine.AssetBundle)ToLua.CheckObject <UnityEngine.AssetBundle>(L, 1);
                string               arg0   = ToLua.CheckString(L, 2);
                System.Type          arg1   = ToLua.CheckMonoType(L, 3);
                UnityEngine.Object[] o      = obj.LoadAssetWithSubAssets(arg0, arg1);
                ToLua.Push(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.AssetBundle.LoadAssetWithSubAssets"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #6
0
 static public int LoadAssetWithSubAssets(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
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(string)))
         {
             UnityEngine.AssetBundle self = (UnityEngine.AssetBundle)checkSelf(l);
             System.String           a1;
             checkType(l, 2, out a1);
             var ret = self.LoadAssetWithSubAssets <UnityEngine.Object>(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(string)))
         {
             UnityEngine.AssetBundle self = (UnityEngine.AssetBundle)checkSelf(l);
             System.String           a1;
             checkType(l, 2, out a1);
             var ret = self.LoadAssetWithSubAssets(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 3)
         {
             UnityEngine.AssetBundle self = (UnityEngine.AssetBundle)checkSelf(l);
             System.String           a1;
             checkType(l, 2, out a1);
             System.Type a2;
             checkType(l, 3, out a2);
             var ret = self.LoadAssetWithSubAssets(a1, a2);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function LoadAssetWithSubAssets to call");
         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
 }