Okay so I think I have it sorted, but it’s a bit wierd.
It is asif the class itself was null
So in the game state class that manages it, I added UPROPERTY
APlanePathingManager * PlanePathingManager;
Which seems to have solved it.
Thing is, I was already checking for null before hand:
Yet, it was that UpdateRoutes function that was crashing
Here is the function that was crashing:
//Crash happens trying to empty
UGameplayStatics::GetAllActorsOfClass(GetWorld(), APlaneNavigatableBuilding::StaticClass(), FoundActors);
for (AActor * tmpActor : FoundActors)
ARunwayMaster * tmpRunwayMaster = Cast<ARunwayMaster>(tmpActor);
AApronMaster * tmpApronMaster = Cast<AApronMaster>(tmpActor);
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, FString::Printf(TEXT("Num cached Runways: %i Num cached aprons: %i"), GetNumCachedRunways(), GetNumCachedAprons()));