CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
ContentPacks
ContentPackManifest.h
Go to the documentation of this file.
1
// Copyright (c) 2026 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
#pragma once
8
9
#include <util/ue-header-guard-begin.h>
10
#include "CoreMinimal.h"
11
#include <util/ue-header-guard-end.h>
12
13
/// One map declared by a content pack manifest.
14
struct
CARLA_API
FCarlaContentPackMap
15
{
16
/// Map name as exposed by get_available_maps / load_world.
17
FString
Name
;
18
19
/// Long package name of the level, e.g. "/NewPack/Maps/NewTown".
20
FString
Package
;
21
22
/// OpenDRIVE file relative to the pack Content dir, e.g. "Maps/OpenDrive/NewTown.xodr".
23
FString
Xodr
;
24
25
bool
bWorldPartition
=
false
;
26
};
27
28
/// Parsed carla-pack.json. Authoritative for map discovery: nothing walks the
29
/// pack directories looking for .umap files.
30
///
31
/// {
32
/// "name": "NewPack", "version": "1.0.0",
33
/// "carla_version": "0.10.2", "base_release": "carla-0.10.2-Linux",
34
/// "engine": { "version": "5.8.0", "commit": "abcdef0" }, "platform": "Linux",
35
/// "maps": [ { "name", "package", "xodr", "world_partition" } ],
36
/// "catalogs": [ "Config/Vehicles.json", ... ],
37
/// "files": { "<relpath>": "sha256:..." }
38
/// }
39
struct
CARLA_API
FCarlaContentPackManifest
40
{
41
FString
Name
;
42
FString
Version
;
43
FString
CarlaVersion
;
44
FString
BaseRelease
;
45
FString
EngineVersion
;
46
FString
EngineCommit
;
47
FString
Platform
;
48
TArray<FCarlaContentPackMap>
Maps
;
49
TArray<FString>
Catalogs
;
50
TMap<FString, FString>
Files
;
51
52
/// Absolute path of the manifest file this was parsed from.
53
FString
ManifestPath
;
54
55
/// Absolute path of the pack directory (parent of the manifest).
56
FString
PackDir
;
57
58
/// Parse a manifest from a JSON string. OutError explains a false return.
59
static
bool
Parse
(
60
const
FString &JsonText,
61
FCarlaContentPackManifest
&OutManifest,
62
FString &OutError);
63
64
/// Read and parse <ManifestPath>. Fills ManifestPath/PackDir.
65
static
bool
LoadFromFile
(
66
const
FString &InManifestPath,
67
FCarlaContentPackManifest
&OutManifest,
68
FString &OutError);
69
70
/// Name must be usable as a plugin name and mount point ("/<Name>/").
71
static
bool
IsValidPackName
(
const
FString &InName);
72
73
TArray<FString>
GetMapNames
()
const
;
74
};
FCarlaContentPackManifest
Parsed carla-pack.json.
Definition
ContentPackManifest.h:40
FCarlaContentPackManifest::Catalogs
TArray< FString > Catalogs
Definition
ContentPackManifest.h:49
FCarlaContentPackManifest::LoadFromFile
static bool LoadFromFile(const FString &InManifestPath, FCarlaContentPackManifest &OutManifest, FString &OutError)
Read and parse <ManifestPath>. Fills ManifestPath/PackDir.
Definition
ContentPackManifest.cpp:145
FCarlaContentPackManifest::ManifestPath
FString ManifestPath
Absolute path of the manifest file this was parsed from.
Definition
ContentPackManifest.h:53
FCarlaContentPackManifest::Parse
static bool Parse(const FString &JsonText, FCarlaContentPackManifest &OutManifest, FString &OutError)
Parse a manifest from a JSON string. OutError explains a false return.
Definition
ContentPackManifest.cpp:34
FCarlaContentPackManifest::PackDir
FString PackDir
Absolute path of the pack directory (parent of the manifest).
Definition
ContentPackManifest.h:56
FCarlaContentPackManifest::Maps
TArray< FCarlaContentPackMap > Maps
Definition
ContentPackManifest.h:48
FCarlaContentPackManifest::IsValidPackName
static bool IsValidPackName(const FString &InName)
Name must be usable as a plugin name and mount point ("/<Name>/").
Definition
ContentPackManifest.cpp:18
FCarlaContentPackManifest::Name
FString Name
Definition
ContentPackManifest.h:41
FCarlaContentPackManifest::EngineCommit
FString EngineCommit
Definition
ContentPackManifest.h:46
FCarlaContentPackManifest::BaseRelease
FString BaseRelease
Definition
ContentPackManifest.h:44
FCarlaContentPackManifest::Platform
FString Platform
Definition
ContentPackManifest.h:47
FCarlaContentPackManifest::EngineVersion
FString EngineVersion
Definition
ContentPackManifest.h:45
FCarlaContentPackManifest::GetMapNames
TArray< FString > GetMapNames() const
Definition
ContentPackManifest.cpp:167
FCarlaContentPackManifest::CarlaVersion
FString CarlaVersion
Definition
ContentPackManifest.h:43
FCarlaContentPackManifest::Files
TMap< FString, FString > Files
Definition
ContentPackManifest.h:50
FCarlaContentPackManifest::Version
FString Version
Definition
ContentPackManifest.h:42
FCarlaContentPackMap
One map declared by a content pack manifest.
Definition
ContentPackManifest.h:15
FCarlaContentPackMap::bWorldPartition
bool bWorldPartition
Definition
ContentPackManifest.h:25
FCarlaContentPackMap::Package
FString Package
Long package name of the level, e.g. "/NewPack/Maps/NewTown".
Definition
ContentPackManifest.h:20
FCarlaContentPackMap::Xodr
FString Xodr
OpenDRIVE file relative to the pack Content dir, e.g. "Maps/OpenDrive/NewTown.xodr".
Definition
ContentPackManifest.h:23
FCarlaContentPackMap::Name
FString Name
Map name as exposed by get_available_maps / load_world.
Definition
ContentPackManifest.h:17
Generated by
1.18.0