static int SetDecryptResourceCallback(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UnityGameFramework.Runtime.ResourceComponent obj = (UnityGameFramework.Runtime.ResourceComponent)ToLua.CheckObject(L, 1, typeof(UnityGameFramework.Runtime.ResourceComponent)); GameFramework.Resource.DecryptResourceCallback arg0 = null; LuaTypes funcType2 = LuaDLL.lua_type(L, 2); if (funcType2 != LuaTypes.LUA_TFUNCTION) { arg0 = (GameFramework.Resource.DecryptResourceCallback)ToLua.CheckObject(L, 2, typeof(GameFramework.Resource.DecryptResourceCallback)); } else { LuaFunction func = ToLua.ToLuaFunction(L, 2); arg0 = DelegateFactory.CreateDelegate(typeof(GameFramework.Resource.DecryptResourceCallback), func) as GameFramework.Resource.DecryptResourceCallback; } obj.SetDecryptResourceCallback(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }