9 #include "CoreMinimal.h" 10 #include "GameFramework/GameModeBase.h" 13 #include <boost/optional.hpp> 31 #include "CarlaGameModeBase.generated.h" 34 UCLASS(HideCategories=(ActorTick))
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();
117 void InitGame(
const FString &MapName,
const FString &Options, FString &ErrorMessage)
override;
119 void RestartPlayer(
AController *NewPlayer)
override;
121 void BeginPlay()
override;
123 void EndPlay(
const EEndPlayReason::Type EndPlayReason)
override;
125 void Tick(
float DeltaSeconds)
override;
129 void SpawnActorFactories();
131 void StoreSpawnPoints();
133 void GenerateSpawnPoints();
135 void ParseOpenDrive();
137 void RegisterEnvironmentObjects();
139 void ConvertMapLayerMaskToMapNames(int32
MapLayer, TArray<FName>& OutLevelNames);
162 UPROPERTY(Category = "CARLA Game Mode", EditAnywhere)
167 UPROPERTY(Category = "CARLA Game Mode", EditAnywhere)
171 TArray<FTransform> SpawnPointsTransforms;
181 FDelegateHandle OnEpisodeSettingsChangeHandle;
183 boost::optional<
carla::road::Map> Map;
185 int PendingLevelsToLoad = 0;
186 int PendingLevelsToUnLoad = 0;
188 bool ReadyToRegisterObjects = false;
192 int32 LatentInfoUUID = 0;
Base class for Carla actor factories.
Used to tag every actor that is spawned into the world.
The game instance contains elements that must be kept alive in between levels.
This file contains definitions of common data structures used in traffic manager. ...
Used to set settings for every actor that is spawned into the world.
carla::SharedPtr< cc::Actor > Actor
Recorder for the simulation.
const boost::optional< carla::road::Map > & GetMap() const
ALargeMapManager * GetLMManager() const
Base class for the CARLA Game Mode.
const UCarlaEpisode & GetCarlaEpisode() const
Class In charge of creating and assigning traffic light groups, controllers and components.