CARLA
CarlaStatics.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #include "Carla.h"
9 
10 #include "Runtime/Core/Public/HAL/FileManagerGeneric.h"
11 
13 {
14  TArray<FString> TmpStrList, MapNameList;
15  IFileManager::Get().FindFilesRecursive(
16  MapNameList, *FPaths::ProjectContentDir(), TEXT("*.umap"), true, false, false);
17  MapNameList.RemoveAll( [](const FString &Name) { return Name.Contains("TestMaps");});
18  MapNameList.RemoveAll( [](const FString &Name) { return Name.Contains("OpenDriveMap");});
19  for (int i = 0; i < MapNameList.Num(); i++) {
20  MapNameList[i].ParseIntoArray(TmpStrList, TEXT("Content/"), true);
21  MapNameList[i] = TmpStrList[1];
22  MapNameList[i] = MapNameList[i].Replace(TEXT(".umap"), TEXT(""));
23  MapNameList[i] = "/Game/" + MapNameList[i];
24  }
25  return MapNameList;
26 }
static TArray< FString > GetAllMapNames()
static T Get(carla::rpc::Response< T > &response)