static int _m_BuildTileMesh(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);



                int gen_param_count = LuaAPI.lua_gettop(L);

                if (gen_param_count == 5 && translator.Assignable <PF.RecastGraph>(L, 1) && translator.Assignable <Pathfinding.Voxels.Voxelize>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 5))
                {
                    PF.RecastGraph _self             = (PF.RecastGraph)translator.GetObject(L, 1, typeof(PF.RecastGraph));
                    Pathfinding.Voxels.Voxelize _vox = (Pathfinding.Voxels.Voxelize)translator.GetObject(L, 2, typeof(Pathfinding.Voxels.Voxelize));
                    int _x           = LuaAPI.xlua_tointeger(L, 3);
                    int _z           = LuaAPI.xlua_tointeger(L, 4);
                    int _threadIndex = LuaAPI.xlua_tointeger(L, 5);

                    PF.NavmeshTile gen_ret = Pathfinding.UnityHelper.BuildTileMesh(
                        _self,
                        _vox,
                        _x,
                        _z,
                        _threadIndex);
                    translator.Push(L, gen_ret);



                    return(1);
                }
                if (gen_param_count == 4 && translator.Assignable <PF.RecastGraph>(L, 1) && translator.Assignable <Pathfinding.Voxels.Voxelize>(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4))
                {
                    PF.RecastGraph _self             = (PF.RecastGraph)translator.GetObject(L, 1, typeof(PF.RecastGraph));
                    Pathfinding.Voxels.Voxelize _vox = (Pathfinding.Voxels.Voxelize)translator.GetObject(L, 2, typeof(Pathfinding.Voxels.Voxelize));
                    int _x = LuaAPI.xlua_tointeger(L, 3);
                    int _z = LuaAPI.xlua_tointeger(L, 4);

                    PF.NavmeshTile gen_ret = Pathfinding.UnityHelper.BuildTileMesh(
                        _self,
                        _vox,
                        _x,
                        _z);
                    translator.Push(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to Pathfinding.UnityHelper.BuildTileMesh!"));
        }