Exemple #1
0
    static int LoadBytes(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            UnityGameFramework.Runtime.ResourceComponent obj = (UnityGameFramework.Runtime.ResourceComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.ResourceComponent));
            string arg0 = ToLua.CheckString(L, 2);
            GameFramework.Resource.LoadBytesCallback arg1 = null;
            LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

            if (funcType3 != LuaTypes.LUA_TFUNCTION)
            {
                arg1 = (GameFramework.Resource.LoadBytesCallback)ToLua.CheckObject(L, 3, typeof(GameFramework.Resource.LoadBytesCallback));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 3);
                arg1 = DelegateFactory.CreateDelegate(typeof(GameFramework.Resource.LoadBytesCallback), func) as GameFramework.Resource.LoadBytesCallback;
            }

            obj.LoadBytes(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }