static int BeginSample(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); LuaProfilerExtension.BeginSample(arg0); return(0); } else if (count == 2) { int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); string arg1 = ToLua.CheckString(L, 2); LuaProfilerExtension.BeginSample(arg0, arg1); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaProfilerExtension.BeginSample")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int EndSample(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); LuaProfilerExtension.EndSample(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int EndSample(IntPtr L) { #if UNITY_EDITOR ToluaProfiler.AddCallRecord("LuaProfilerExtension.EndSample"); #endif try { ToLua.CheckArgsCount(L, 0); LuaProfilerExtension.EndSample(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }