45 check(Episode !=
nullptr);
49 const boost::optional<carla::road::Map>&
GetMap()
const {
53 const FString GetFullMapPath()
const;
56 const FString GetRelativeMapPath()
const;
58 UFUNCTION(Exec, Category =
"CARLA Game Mode")
59 void DebugShowSignals(
bool enable);
61 UFUNCTION(BlueprintCallable, Category = "CARLA Game Mode")
64 UFUNCTION(Category = "Carla Game Mode", BlueprintCallable)
65 const TArray<FTransform>& GetSpawnPointsTransforms()
const{
66 return SpawnPointsTransforms;
69 UFUNCTION(Category =
"Carla Game Mode", BlueprintCallable, CallInEditor, Exec)
70 TArray<FBoundingBox> GetAllBBsOfLevel(uint8 TagQueried = 0xFF)
const;
72 UFUNCTION(Category =
"Carla Game Mode", BlueprintCallable, CallInEditor, Exec)
75 return ObjectRegister->GetEnvironmentObjects(QueriedTag);
78 void EnableEnvironmentObjects(
const TSet<uint64>& EnvObjectIds,
bool Enable);
80 void EnableOverlapEvents();
82 void CheckForEmptyMeshes();
84 UFUNCTION(Category =
"Carla Game Mode", BlueprintCallable, CallInEditor, Exec)
85 void LoadMapLayer(int32 MapLayers);
87 UFUNCTION(Category =
"Carla Game Mode", BlueprintCallable, CallInEditor, Exec)
88 void UnLoadMapLayer(int32 MapLayers);
90 UFUNCTION(Category =
"Carla Game Mode")
91 ULevel* GetULevelFromName(FString LevelName);
93 UFUNCTION(BlueprintCallable, Category = "Carla Game Mode")
94 void OnLoadStreamLevel();
96 UFUNCTION(BlueprintCallable, Category = "Carla Game Mode")
97 void OnUnloadStreamLevel();
103 AActor* FindActorByName(
const FString& ActorName);
108 void ApplyTextureToActor(
113 TArray<FString> GetNamesOfAllActors();
116 UPROPERTY(BlueprintReadOnly, EditAnywhere, Category=
"Sensor Gravity")
117 float IMUISensorGravity = 9.81f;
121 void InitGame(const FString &MapName, const FString &Options, FString &ErrorMessage) override;
123 void RestartPlayer(
AController *NewPlayer) override;
125 void BeginPlay() override;
127 void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
129 void Tick(
float DeltaSeconds) override;
133 void SpawnActorFactories();
135 void StoreSpawnPoints();
137 void GenerateSpawnPoints();
139 void ParseOpenDrive();
141 void RegisterEnvironmentObjects();
143 void ConvertMapLayerMaskToMapNames(int32 MapLayer, TArray<FName>& OutLevelNames);
166 UPROPERTY(Category = "CARLA Game Mode", EditAnywhere)
171 UPROPERTY(Category = "CARLA Game Mode", EditAnywhere)
175 TArray<FTransform> SpawnPointsTransforms;
186 FDelegateHandle OnEpisodeSettingsChangeHandle;
188 boost::optional<
carla::road::Map> Map;
190 int PendingLevelsToLoad = 0;
191 int PendingLevelsToUnLoad = 0;
193 bool ReadyToRegisterObjects = false;
197 int32 LatentInfoUUID = 0;