10 #include "Commandlets/Commandlet.h" 11 #include "Runtime/Engine/Classes/Engine/ObjectLibrary.h" 12 #include "Runtime/Engine/Classes/Engine/StaticMeshActor.h" 13 #include "AssetRegistry/AssetRegistryModule.h" 14 #include "PrepareAssetsForCookingCommandlet.generated.h" 18 #undef InterlockedCompareExchange 19 #undef _InterlockedCompareExchange 28 GENERATED_USTRUCT_BODY()
32 bool bOnlyPrepareMaps;
39 GENERATED_USTRUCT_BODY()
45 bool bUseCarlaMapMaterials;
52 GENERATED_USTRUCT_BODY()
54 TArray<FMapData> MapsPaths;
56 TArray<FString> PropsPaths;
69 #if WITH_EDITORONLY_DATA 72 FPackageParams ParseParams(
const FString &InParams)
const;
76 void LoadWorld(FAssetData &AssetData);
80 void LoadWorldTile(FAssetData &AssetData);
82 void LoadLargeMapWorld(FAssetData &AssetData);
90 TArray<AStaticMeshActor *> SpawnMeshesToWorld(
91 const TArray<FString> &AssetsPaths,
92 bool bUseCarlaMaterials,
99 FAssetData &AssetData,
100 const FString &PackageName,
101 const FString &DestPath,
102 const FString &WorldName,
103 bool bGenerateSpawnPoints =
true);
106 void DestroySpawnedActorsInWorld(TArray<AStaticMeshActor *> &SpawnedActors);
110 FAssetsPaths GetAssetsPathFromPackage(
const FString &PackageName)
const;
113 void GenerateMapPathsFile(
const FAssetsPaths &AssetsPaths,
const FString &PropsMapPath);
117 void GeneratePackagePathFile(
const FString &PackageName);
122 void PrepareMapsForCooking(
const FString &PackageName,
const TArray<FMapData> &MapsPaths);
127 void PreparePropsForCooking(FString &PackageName,
const TArray<FString> &PropsPaths, FString &MapDestPath);
130 bool IsMapInTiles(
const TArray<FString> &AssetsPaths);
136 virtual int32 Main(
const FString &Params)
override;
138 #endif // WITH_EDITORONLY_DATA 144 TArray<FAssetData> AssetDatas;
148 TArray<FAssetData> MapContents;
153 UObjectLibrary *MapObjectLibrary;
158 UObjectLibrary *AssetsObjectLibrary;
166 UMaterialInstance *RoadNodeMaterial;
170 UMaterialInstance *CurbNodeMaterialInstance;
174 UMaterialInstance *GutterNodeMaterialInstance;
178 UMaterialInstance *MarkingNodeYellow;
182 UMaterialInstance *MarkingNodeWhite;
186 UMaterialInstance *TerrainNodeMaterialInstance;
190 UMaterialInstance *SidewalkNodeMaterialInstance;
194 bool SavePackage(const FString &PackagePath, UPackage *Package) const;
198 FString GetFirstPackagePath(const FString &PackageName) const;
Struct containing Package with Name and bOnlyPrepareMaps flag used to separate the cooking of maps an...
std::vector< cg::Location > Path
Struct containing map data read from .Package.json file.
Struct containing all assets data read from .Package.json file.