private static int set_updateWhenOffscreen(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); SkinnedMeshRenderer skinnedMeshRenderer = (SkinnedMeshRenderer)obj; bool updateWhenOffscreen = LuaDLL.luaL_checkboolean(L, 2); skinnedMeshRenderer.set_updateWhenOffscreen(updateWhenOffscreen); result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.get_Message() : "attempt to index updateWhenOffscreen on a nil value"); } return(result); }