Example #1
0
    static int LoadAsset(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.ResourceComponent), typeof(string), typeof(GameFramework.Resource.LoadAssetCallbacks)))
            {
                UnityGameFramework.Runtime.ResourceComponent obj = (UnityGameFramework.Runtime.ResourceComponent)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                GameFramework.Resource.LoadAssetCallbacks arg1 = (GameFramework.Resource.LoadAssetCallbacks)ToLua.ToObject(L, 3);
                obj.LoadAsset(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes(L, 1, typeof(UnityGameFramework.Runtime.ResourceComponent), typeof(string), typeof(GameFramework.Resource.LoadAssetCallbacks), typeof(object)))
            {
                UnityGameFramework.Runtime.ResourceComponent obj = (UnityGameFramework.Runtime.ResourceComponent)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                GameFramework.Resource.LoadAssetCallbacks arg1 = (GameFramework.Resource.LoadAssetCallbacks)ToLua.ToObject(L, 3);
                object arg2 = ToLua.ToVarObject(L, 4);
                obj.LoadAsset(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityGameFramework.Runtime.ResourceComponent.LoadAsset"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }