Fixed for loop error

This commit is contained in:
Roel Algaba Brizuela 2021-05-31 13:30:47 +02:00 committed by bernat
parent cf4087971e
commit 4ee1f63314
1 changed files with 2 additions and 2 deletions

View File

@ -371,9 +371,9 @@ void ULoadAssetMaterialsCommandlet::LoadAssetsMaterials(const FString &PackageNa
TArray<AActor*> FoundActors;
UGameplayStatics::GetAllActorsOfClass(World, AStaticMeshActor::StaticClass(), FoundActors);
bool HasRoadMesh = false;
for (int32 i = 0; i < FoundActors.Num() && HasRoadMesh == false; ++i) {
for (int32 j = 0; j < FoundActors.Num() && HasRoadMesh == false; ++j) {
AStaticMeshActor *MeshActor = Cast<AStaticMeshActor>(FoundActors[i]);
AStaticMeshActor *MeshActor = Cast<AStaticMeshActor>(FoundActors[j]);
if (MeshActor->GetName().Contains("Roads") || MeshActor->GetName().Contains("Road")){
HasRoadMesh = true;