public SerializedBattleGridPoint(NavmeshLayserSerializer ns, BattleGridPoint point) { position = point.positionV3; gridX = point.gridX; gridZ = point.gridZ; id = ns.GetBattleGridID(point); passability = (int)point.passability; neighbours = new int[4]; for (int i = 0; i < 4; i++) { neighbours[i] = point.neighbours[i] != null?ns.GetBattleGridID(point.neighbours[i]) : -1; } }