static internal int checkDelegate(IntPtr l, int p, out UnityEngine.Display.DisplaysUpdatedDelegate ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <UnityEngine.Display.DisplaysUpdatedDelegate>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = () => { int error = pushTry(l); LuaDLL.lua_getref(l, r); if (LuaDLL.lua_pcall(l, 0, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out UnityEngine.AudioClip.PCMSetPositionCallback ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <UnityEngine.AudioClip.PCMSetPositionCallback>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (int a1) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); if (LuaDLL.lua_pcall(l, 1, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out UnityEngine.RectTransform.ReapplyDrivenProperties ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <UnityEngine.RectTransform.ReapplyDrivenProperties>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (UnityEngine.RectTransform a1) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); if (LuaDLL.lua_pcall(l, 1, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }
static bool checkType(IntPtr l, int p, out UnityEngine.Events.UnityAction <String> ua) { LuaDLL.luaL_checktype(l, p, LuaTypes.LUA_TFUNCTION); int r = LuaDLL.luaS_checkcallback(l, p); ua = (String v) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, v); if (LuaDLL.lua_pcall(l, 1, 0, error) != 0) { LuaDLL.lua_pop(l, 1); // pop error msg } LuaDLL.lua_pop(l, 1); // pop error function }; return(true); }
static internal int checkDelegate(IntPtr l, int p, out HelloWorld.GetBundleInfoDelegate ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <HelloWorld.GetBundleInfoDelegate>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (string a1, out string a2, out int a3, out UInt32 a4, ref int a5) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); pushValue(l, a5); if (LuaDLL.lua_pcall(l, 2, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } bool ret; checkType(l, error + 1, out ret); checkType(l, error + 2, out a2); checkType(l, error + 3, out a3); checkType(l, error + 4, out a4); checkType(l, error + 5, out a5); LuaDLL.lua_pop(l, 1); return(ret); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out UnityEngine.UI.InputField.OnValidateInput ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <UnityEngine.UI.InputField.OnValidateInput>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (string a1, int a2, System.Char a3) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); pushValue(l, a2); pushValue(l, a3); if (LuaDLL.lua_pcall(l, 3, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } System.Char ret; checkType(l, error + 1, out ret); LuaDLL.lua_pop(l, 1); return(ret); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out System.Func <UnityEngine.UI.ILayoutElement, System.Single> ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <System.Func <UnityEngine.UI.ILayoutElement, System.Single> >(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (UnityEngine.UI.ILayoutElement a1) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); if (LuaDLL.lua_pcall(l, 1, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } float ret; checkType(l, error + 1, out ret); LuaDLL.lua_pop(l, 1); return(ret); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out UnityEngine.Application.LogCallback ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <UnityEngine.Application.LogCallback>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (string a1, string a2, UnityEngine.LogType a3) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); pushValue(l, a2); pushValue(l, a3); if (LuaDLL.lua_pcall(l, 3, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out System.Func <System.Int32> ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <System.Func <System.Int32> >(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = () => { int error = pushTry(l); LuaDLL.lua_getref(l, r); if (LuaDLL.lua_pcall(l, 0, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } int ret; checkType(l, error + 1, out ret); LuaDLL.lua_pop(l, 1); return(ret); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out UnityEngine.EventSystems.ExecuteEvents.EventFunction <UnityEngine.EventSystems.ICancelHandler> ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <UnityEngine.EventSystems.ExecuteEvents.EventFunction <UnityEngine.EventSystems.ICancelHandler> >(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (UnityEngine.EventSystems.ICancelHandler a1, UnityEngine.EventSystems.BaseEventData a2) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); pushValue(l, a2); if (LuaDLL.lua_pcall(l, 2, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out System.Action <System.Int32, Dictionary <System.Int32, object> > ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <System.Action <System.Int32, Dictionary <System.Int32, object> > >(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (int a1, Dictionary <System.Int32, object> a2) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); pushValue(l, a2); if (LuaDLL.lua_pcall(l, 2, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }
static internal int checkDelegate(IntPtr l, int p, out HelloWorld.SimpleDelegate ua) { int op = extractFunction(l, p); if (LuaDLL.lua_isnil(l, -1)) { ua = null; return(op); } int r = LuaDLL.luaS_checkcallback(l, -1); if (r < 0) { LuaDLL.luaL_error(l, "expect function"); } if (getCacheDelegate <HelloWorld.SimpleDelegate>(r, out ua)) { return(op); } LuaDLL.lua_pop(l, 1); ua = (string a1, UnityEngine.GameObject a2) => { int error = pushTry(l); LuaDLL.lua_getref(l, r); pushValue(l, a1); pushValue(l, a2); if (LuaDLL.lua_pcall(l, 2, -1, error) != 0) { LuaDLL.lua_pop(l, 1); } LuaDLL.lua_pop(l, 1); }; cacheDelegate(r, ua); return(op); }