CARLA
Loading...
Searching...
No Matches
Functions | Variables
CarlaStatics.cpp File Reference
#include "Carla/Game/CarlaStatics.h"
#include "Carla.h"
#include "Carla/ContentPacks/ContentPackManager.h"
#include <util/ue-header-guard-begin.h>
#include "AssetRegistry/ARFilter.h"
#include "AssetRegistry/AssetData.h"
#include "AssetRegistry/IAssetRegistry.h"
#include "Engine/World.h"
#include "Interfaces/IPluginManager.h"
#include "Misc/Paths.h"
#include "Misc/PackageName.h"
#include "Modules/ModuleManager.h"
#include "HAL/FileManagerGeneric.h"
#include <util/ue-header-guard-end.h>

Go to the source code of this file.

Functions

static const TArray< FString > & UCarlaStatics_GetMapFiles ()
 
static TArray< FAssetData > UCarlaStatics_GetRegistryWorlds ()
 UWorld assets the asset registry knows outside /Engine (project content, mounted plugins, content packs).
 
static bool UCarlaStatics_IsHiddenMap (const FString &PathOrPackage)
 Maps that get_available_maps must not list: the OpenDRIVE-generated scratch map, sub-levels and World Partition helper packages, and the test maps — except EmptyMap, which is a supported empty sandbox (it ships with an empty OpenDRIVE file so get_map() works).
 

Variables

static bool UCarlaStatics_bMapFilesDirty = true
 
static TArray< FString > UCarlaStatics_CachedMapFiles
 The recursive .umap walk over the project and plugin content dirs is expensive (tens of thousands of files in an editor tree) and runs on the game thread for get_available_maps / load_world, so its result is cached keyed on the set of content dirs; content pack mount/unmount invalidates it.
 
static FString UCarlaStatics_CachedMapFilesKey
 

Function Documentation

◆ UCarlaStatics_GetMapFiles()

static const TArray< FString > & UCarlaStatics_GetMapFiles ( )
static

◆ UCarlaStatics_GetRegistryWorlds()

static TArray< FAssetData > UCarlaStatics_GetRegistryWorlds ( )
static

UWorld assets the asset registry knows outside /Engine (project content, mounted plugins, content packs).

Cooked base maps live inside Pak/IoStore containers where the .umap walk finds nothing; the premade AssetRegistry.bin of a packaged build still lists them. The registry asserts on non-game threads, so off-thread callers get an empty list.

Definition at line 29 of file CarlaStatics.cpp.

Referenced by UCarlaStatics::FindMapPath(), and UCarlaStatics::GetAllMapNames().

◆ UCarlaStatics_IsHiddenMap()

static bool UCarlaStatics_IsHiddenMap ( const FString &  PathOrPackage)
static

Maps that get_available_maps must not list: the OpenDRIVE-generated scratch map, sub-levels and World Partition helper packages, and the test maps — except EmptyMap, which is a supported empty sandbox (it ships with an empty OpenDRIVE file so get_map() works).

Definition at line 143 of file CarlaStatics.cpp.

Referenced by UCarlaStatics::GetAllMapNames().

Variable Documentation

◆ UCarlaStatics_bMapFilesDirty

bool UCarlaStatics_bMapFilesDirty = true
static

◆ UCarlaStatics_CachedMapFiles

TArray<FString> UCarlaStatics_CachedMapFiles
static

The recursive .umap walk over the project and plugin content dirs is expensive (tens of thousands of files in an editor tree) and runs on the game thread for get_available_maps / load_world, so its result is cached keyed on the set of content dirs; content pack mount/unmount invalidates it.

Definition at line 79 of file CarlaStatics.cpp.

Referenced by UCarlaStatics_GetMapFiles().

◆ UCarlaStatics_CachedMapFilesKey

FString UCarlaStatics_CachedMapFilesKey
static

Definition at line 80 of file CarlaStatics.cpp.

Referenced by UCarlaStatics_GetMapFiles().