Download

Issues getting polygons from navigation system

I’ve been toying with this navigation code that has been dated a bit: Here

I’m not afraid to admit that I’m rather a noob to C++ (I used to do some light C++ YEARS ago).

Anyway, I’ve created a custom AIController class with a custom PathFollowingComponent, and have made the following function (Based on the link above)


//Retrieves a list of NavNodeRefs for all polygons in the active navmesh
bool UMyPathFollowingComponent::GetAllNavPolygons(TArray<NavNodeRef> &PolyRefs)
{
	//Get the active navigation system
	UNavigationSystem* NavSys = GetWorld()->GetNavigationSystem();
	//Check that the NavSys is valid
	if (NavSys) {
		//Log
		UE_LOG(LogClass, Log, TEXT("NavSys = true"));

		//Agent properties used for navigation
		const FNavAgentProperties& AgentProperties = MovementComp->GetNavAgentPropertiesRef();
		//Navdata filter to get the navdataforprops
		const ANavigationData* NavData = NavSys->GetNavDataForProps(AgentProperties);

		//Check if we have a valid movementcomponent
		if (MovementComp) {
			//Log
			UE_LOG(LogClass, Log, TEXT("MoveComp = true"));

			//Get the navmesh filtered from NavData
			const ARecastNavMesh* NavMesh = Cast<ARecastNavMesh>(NavData);
			//Check that the NavMesh is valid
			if (NavMesh) {
				//Log
				UE_LOG(LogClass, Log, TEXT("NavMesh = true"));

				//Temporarily holds polygon data from GetPolysInTile
				TArray<FNavPoly> EachPolys;
				//Used for valid tile checking
				FBox TileBounds;

				//Go through all tiles in the NavMesh
				for (int32 v = 0; v < NavMesh->GetNavMeshTilesCount(); v++)
				{
					//Log
					UE_LOG(LogClass, Log, TEXT("Checking Tile %d"), v);

					//Test if the TileBounds indicates a valid or invalid tile
					TileBounds = NavMesh->GetNavMeshTileBounds(v);
					//Skip the rest of the loop on an invalid tile
					if (TileBounds.IsValid != 0) { continue; }
					//Log
					UE_LOG(LogClass, Log, TEXT("Tile Valid!"));

					//Get the polygons on the current tile
					NavMesh->GetPolysInTile(v, EachPolys);
					//Log
					UE_LOG(LogClass, Log, TEXT("Found %d Polys"), EachPolys.Num());

					//Add polygon references to PolyRefs
					if (EachPolys.Num() > 0) {
						UE_LOG(LogClass, Log, TEXT("Adding first element only - as test"));
						PolyRefs.Add(EachPolys[0].Ref);
					}
				}
				return true; //success after loop
			}
		}
	}
  return false; //failure - loop never executed
}

Whenever I run this in the editor, my log shows the following output:


LogClass: NavSys = true
LogClass: MoveComp = true
LogClass: NavMesh = true
LogClass: Checking Tile 0
LogClass: Checking Tile 1
LogClass: Checking Tile 2
LogClass: Checking Tile 3
LogClass: Checking Tile 4
LogClass: Checking Tile 5
LogClass: Checking Tile 6
LogClass: Checking Tile 7
LogClass: Checking Tile 8
LogClass: Checking Tile 9
LogClass: Checking Tile 10
LogClass: Checking Tile 11
LogClass: Checking Tile 12
LogClass: Checking Tile 13
LogClass: Checking Tile 14
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 15
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 16
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 17
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 18
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 19
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 20
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 21
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 22
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 23
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 24
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 25
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 26
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 27
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 28
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 29
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 30
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 31
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 32
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 33
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 34
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 35
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 36
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 37
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 38
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 39
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 40
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 41
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 42
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 43
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 44
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 45
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 46
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 47
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 48
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 49
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 50
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 51
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 52
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 53
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 54
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 55
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 56
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 57
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 58
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 59
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 60
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 61
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 62
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 63
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 64
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 65
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 66
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 67
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 68
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 69
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 70
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 71
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 72
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 73
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 74
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 75
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 76
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 77
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 78
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 79
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 80
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 81
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 82
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 83
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 84
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 85
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 86
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 87
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 88
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 89
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 90
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 91
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 92
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 93
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 94
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 95
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 96
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 97
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 98
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 99
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 100
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 101
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 102
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 103
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 104
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 105
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 106
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 107
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 108
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 109
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 110
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 111
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 112
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 113
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 114
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 115
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 116
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 117
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 118
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 119
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 120
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 121
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 122
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 123
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 124
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 125
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 126
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 127
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 128
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 129
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 130
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 131
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 132
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 133
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 134
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 135
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 136
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 137
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 138
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 139
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 140
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 141
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 142
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 143
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 144
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 145
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 146
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 147
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 148
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 149
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 150
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 151
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 152
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 153
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 154
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 155
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 156
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 157
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 158
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 159
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 160
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 161
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 162
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 163
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 164
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 165
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 166
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 167
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 168
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 169
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 170
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 171
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 172
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 173
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 174
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 175
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 176
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 177
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 178
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 179
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 180
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 181
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 182
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 183
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 184
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 185
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 186
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 187
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 188
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 189
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 190
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 191
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 192
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 193
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 194
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 195
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 196
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 197
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 198
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 199
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 200
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 201
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 202
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 203
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 204
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 205
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 206
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 207
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 208
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 209
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 210
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 211
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 212
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 213
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 214
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 215
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 216
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 217
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 218
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 219
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 220
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 221
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 222
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 223
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 224
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 225
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 226
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 227
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 228
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 229
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 230
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 231
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 232
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 233
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 234
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 235
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 236
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 237
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 238
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 239
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 240
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 241
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 242
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 243
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 244
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 245
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 246
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 247
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 248
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 249
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 250
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 251
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 252
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 253
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 254
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 255
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 256
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 257
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 258
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 259
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 260
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 261
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 262
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 263
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 264
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 265
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 266
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 267
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 268
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 269
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 270
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 271
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 272
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 273
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 274
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 275
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 276
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 277
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 278
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 279
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 280
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 281
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 282
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 283
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 284
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 285
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 286
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 287
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 288
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 289
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 290
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 291
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 292
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 293
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 294
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 295
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 296
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 297
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 298
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 299
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 300
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 301
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 302
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 303
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 304
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 305
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 306
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 307
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 308
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 309
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 310
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 311
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 312
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 313
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 314
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 315
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 316
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 317
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 318
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 319
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 320
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 321
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 322
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 323
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 324
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 325
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 326
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 327
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 328
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 329
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 330
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 331
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 332
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 333
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 334
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 335
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 336
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 337
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 338
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 339
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 340
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 341
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 342
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 343
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 344
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 345
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 346
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 347
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 348
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 349
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 350
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 351
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 352
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 353
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 354
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 355
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 356
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 357
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 358
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 359
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 360
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 361
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 362
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 363
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 364
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 365
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 366
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 367
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 368
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 369
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 370
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 371
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 372
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 373
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 374
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 375
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 376
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 377
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 378
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 379
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 380
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 381
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 382
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 383
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 384
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 385
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 386
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 387
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 388
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 389
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 390
LogClass: Tile Valid!
LogClass: Found 0 Polys
LogClass: Checking Tile 391
LogClass: Tile Valid!
LogClass: Found 0 Polys

In short, I am finding NO polygons on my navmesh, even though I definitely do have a navmesh.

I’ve been poking around online to find some help/documentation on this - but it appears that the AI navigation features in UE4 are missing a lot of documentation. Does anyone have any thoughts on what I might be doing wrong?

Of course I solve it a few moments after I post it.

For anyone who might stumble across this, the line which reads:

if (TileBounds.IsValid != 0) { continue; }

Just needs to be adjusted to:

if (TileBounds.IsValid == 0) { continue; }

I was trying to get polygons from invalid tiles.