Disabled OpenDriveMap from appearing on map list

This commit is contained in:
Marc Garcia Puig 2020-02-25 15:33:22 +01:00
parent 9cdf00155e
commit f2fcc64a1c
1 changed files with 3 additions and 1 deletions

View File

@ -12,8 +12,10 @@
TArray<FString> UCarlaStatics::GetAllMapNames() TArray<FString> UCarlaStatics::GetAllMapNames()
{ {
TArray<FString> TmpStrList, MapNameList; TArray<FString> TmpStrList, MapNameList;
IFileManager::Get().FindFilesRecursive(MapNameList, *FPaths::ProjectContentDir(), TEXT("*.umap"), true, false, false); IFileManager::Get().FindFilesRecursive(
MapNameList, *FPaths::ProjectContentDir(), TEXT("*.umap"), true, false, false);
MapNameList.RemoveAll( [](const FString &Name) { return Name.Contains("TestMaps");}); MapNameList.RemoveAll( [](const FString &Name) { return Name.Contains("TestMaps");});
MapNameList.RemoveAll( [](const FString &Name) { return Name.Contains("OpenDriveMap");});
for (int i = 0; i < MapNameList.Num(); i++) { for (int i = 0; i < MapNameList.Num(); i++) {
MapNameList[i].ParseIntoArray(TmpStrList, TEXT("Content/"), true); MapNameList[i].ParseIntoArray(TmpStrList, TEXT("Content/"), true);
MapNameList[i] = TmpStrList[1]; MapNameList[i] = TmpStrList[1];