CARLA
Loading...
Searching...
No Matches
UCarlaGameInstance Class Reference

The game instance contains elements that must be kept alive in between levels. More...

#include <CarlaGameInstance.h>

Inheritance diagram for UCarlaGameInstance:

Public Member Functions

FCarlaEngine * GetCarlaEngine ()
UCarlaEpisode * GetCarlaEpisode ()
UCarlaSettings * GetCARLASettings ()
UCarlaSettings & GetCarlaSettings ()
const UCarlaSettings & GetCarlaSettings () const
int32 GetCurrentMapLayer () const
const carla::rpc::OpendriveGenerationParameters & GetOpendriveGenerationParameters () const
FCarlaServer & GetServer ()
const FCarlaServer & GetServer () const
void NotifyBeginEpisode (UCarlaEpisode &Episode)
void NotifyEndEpisode ()
void NotifyInitGame ()
void SetMapLayer (int32 MapLayer)
void SetOpendriveGenerationParameters (const carla::rpc::OpendriveGenerationParameters &Parameters)
 UCarlaGameInstance ()
 ~UCarlaGameInstance ()

Private Attributes

FString _MapPath
FCarlaEngine CarlaEngine
UCarlaSettings * CarlaSettings = nullptr
int32 CurrentMapLayer = static_cast<int32>(carla::rpc::MapLayer::All)
carla::rpc::OpendriveGenerationParameters GenerationParameters
ACarlaRecorder * Recorder = nullptr

Detailed Description

The game instance contains elements that must be kept alive in between levels.

It is instantiate once per game.

Definition at line 29 of file CarlaGameInstance.h.

Constructor & Destructor Documentation

◆ UCarlaGameInstance()

UCarlaGameInstance::UCarlaGameInstance ( )

◆ ~UCarlaGameInstance()

UCarlaGameInstance::~UCarlaGameInstance ( )
default

Member Function Documentation

◆ GetCarlaEngine()

FCarlaEngine * UCarlaGameInstance::GetCarlaEngine ( )
inline

Definition at line 113 of file CarlaGameInstance.h.

References CarlaEngine.

Referenced by ACarlaGameModeBase::InitGame(), and UCarlaEpisode::LoadNewEpisode().

◆ GetCarlaEpisode()

UCarlaEpisode * UCarlaGameInstance::GetCarlaEpisode ( )
inline

◆ GetCARLASettings()

UCarlaSettings * UCarlaGameInstance::GetCARLASettings ( )
inline

Definition at line 53 of file CarlaGameInstance.h.

References CarlaSettings, and GetCARLASettings().

Referenced by GetCARLASettings().

◆ GetCarlaSettings() [1/2]

UCarlaSettings & UCarlaGameInstance::GetCarlaSettings ( )
inline

Definition at line 39 of file CarlaGameInstance.h.

References CarlaSettings.

Referenced by NotifyInitGame().

◆ GetCarlaSettings() [2/2]

const UCarlaSettings & UCarlaGameInstance::GetCarlaSettings ( ) const
inline

Definition at line 45 of file CarlaGameInstance.h.

References CarlaSettings.

◆ GetCurrentMapLayer()

int32 UCarlaGameInstance::GetCurrentMapLayer ( ) const
inline

Definition at line 108 of file CarlaGameInstance.h.

References CurrentMapLayer, and GetCurrentMapLayer().

Referenced by ACarlaGameModeBase::BeginPlay(), and GetCurrentMapLayer().

◆ GetOpendriveGenerationParameters()

◆ GetServer() [1/2]

FCarlaServer & UCarlaGameInstance::GetServer ( )
inline

Definition at line 84 of file CarlaGameInstance.h.

References CarlaEngine.

◆ GetServer() [2/2]

const FCarlaServer & UCarlaGameInstance::GetServer ( ) const
inline

Definition at line 79 of file CarlaGameInstance.h.

References CarlaEngine.

Referenced by ASensorFactory::SpawnActor().

◆ NotifyBeginEpisode()

void UCarlaGameInstance::NotifyBeginEpisode ( UCarlaEpisode & Episode)
inline

Definition at line 69 of file CarlaGameInstance.h.

References CarlaEngine.

Referenced by ACarlaGameModeBase::BeginPlay().

◆ NotifyEndEpisode()

void UCarlaGameInstance::NotifyEndEpisode ( )
inline

Definition at line 74 of file CarlaGameInstance.h.

References CarlaEngine.

Referenced by ACarlaGameModeBase::EndPlay().

◆ NotifyInitGame()

void UCarlaGameInstance::NotifyInitGame ( )
inline

Definition at line 64 of file CarlaGameInstance.h.

References CarlaEngine, and GetCarlaSettings().

Referenced by ACarlaGameModeBase::InitGame().

◆ SetMapLayer()

void UCarlaGameInstance::SetMapLayer ( int32 MapLayer)
inline

Definition at line 102 of file CarlaGameInstance.h.

References CurrentMapLayer, and SetMapLayer().

Referenced by FCarlaServer::FPimpl::BindActions(), and SetMapLayer().

◆ SetOpendriveGenerationParameters()

void UCarlaGameInstance::SetOpendriveGenerationParameters ( const carla::rpc::OpendriveGenerationParameters & Parameters)
inline

Member Data Documentation

◆ _MapPath

FString UCarlaGameInstance::_MapPath
private

Definition at line 134 of file CarlaGameInstance.h.

◆ CarlaEngine

◆ CarlaSettings

UCarlaSettings* UCarlaGameInstance::CarlaSettings = nullptr
private

◆ CurrentMapLayer

int32 UCarlaGameInstance::CurrentMapLayer = static_cast<int32>(carla::rpc::MapLayer::All)
private

Definition at line 131 of file CarlaGameInstance.h.

Referenced by GetCurrentMapLayer(), and SetMapLayer().

◆ GenerationParameters

carla::rpc::OpendriveGenerationParameters UCarlaGameInstance::GenerationParameters
private

◆ Recorder

ACarlaRecorder* UCarlaGameInstance::Recorder = nullptr
private

Definition at line 126 of file CarlaGameInstance.h.

Referenced by UCarlaGameInstance().


The documentation for this class was generated from the following files: