UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ContentBundlePaths.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
8
10{
11 inline constexpr FStringView ContentBundleFolder = TEXTVIEW("/ContentBundle/");
12 inline constexpr FStringView GeneratedFolder = TEXTVIEW("/_Generated_/");
13 inline constexpr FStringView ContentBundleAssetRegistryTagString = TEXTVIEW("ContentBundleGuids");
14
15 // Returns "/ContentBundle/"
17
18 // Returns "ContentBundle"
20 {
21 // Start at index 1 to remove the first "/", Lenght - 2 to remove the trailing "/"
23 }
24
25 // Returns "/ContentBundle/"
27
28 // Returns "_Generated_"
30 {
31 // Start at index 1 to remove the first "/", Lenght - 2 to remove the trailing "/"
32 return FStringView(&GetGeneratedFolder()[1], GetGeneratedFolder().Len() - 2);
33 }
34
39 ENGINE_API void ForEachContentBundleLevelPackagePath(const FString& InLevelPackageName, TFunctionRef<void(const FString&)> Func);
40
41 // Return value uses a reduced amount of character to avoid reaching character limit when cooking
42 // return format is /{MountPoint}/CB/{ContentBundle_ShortUID}/{LevelPath}/{GeneratedFolder}/
44
45 // return format is {LevelPath}
47
48#if WITH_EDITOR
49 // return format is /{MountPoint}/{ContentBundleFolder}/{ContentBundleUID}/
51
52 // return format is /{MountPoint}/{ExternalActorFolder}/{ContentBundleFolder}/{ContentBundleUID}
54
55 // return format is /{MountPoint}/{ContentBundleFolder}/{ContentBundleUID}/{LevelPath}/
57
58 // InContentBundlePath format is : */{ContentBundleFolder}/{ContentBundleUID}/{RelativePath}
59 // return format is {RelativePath}, empty otherwise
61
62 // return true if InPackage follow format : */{ContentBundleFolder}/{ContentBundleUID}/*, false otherwise
64
65 // return an ExternalActor path following the format : /{MountPoint}/{ExternalActorFolder}/{ContentBundleFolder}/{ContentBundleUID}/{LevelPath}/{ExternalActorPackagePath}
66 ENGINE_API FString MakeExternalActorPackagePath(const FString& ContentBundleExternalActorFolder, const FString& ActorName);
67
68 // return true if InPackage follow format : /{MountPoint}/{ExternalActorFolder}/{ContentBundleFolder}/{ContentBundleUID}/*, false otherwise
70
71 // InContentBundleExternalActorPackagePath format is : /{MountPoint}/{ExternalActorFolder}/{ContentBundleFolder}/{ContentBundleUID}/{LevelPath}/{ExternalActorPackagePath}
72 // return format is /{LevelPath}/{ExternalActorPackagePath}, empty otherwise
74
75 // InContentBundleExternalActorPackagePath format is : /{MountPoint}/{ExternalActorFolder}/{ContentBundleFolder}/{ContentBundleUID}/{LevelPath}/{ExternalActorPackagePath}
76 // return format is {ContentBundleUID}, 0 otherwise
78
79 // InExternalActorPath format is : /{MountPoint}/{ExternalActorFolder}/{ContentBundleFolder}/{ContentBundleUID}/{LevelPath}/{ExternalActorPackagePath}
80 // return format is /{ContentBundleFolder}/{ContentBundleUID}/{LevelPath}/{ExternalActorPackagePath}, empty otherwise
82#endif
83}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
TStringView< TCHAR > FStringView
Definition StringFwd.h:45
#define TEXTVIEW(str)
Definition StringView.h:553
Definition AssetRegistryTagsContext.h:98
Definition ContentBundleBase.h:13
Definition NameTypes.h:617
Definition Array.h:670
Definition AssetRegistryState.h:50
Definition ContentBundlePaths.h:10
constexpr FStringView GetContentBundleFolder()
Definition ContentBundlePaths.h:16
ENGINE_API FName GetContentBundleGuidsAssetRegistryTag()
Definition ContentBundlePaths.cpp:18
constexpr FStringView ContentBundleFolder
Definition ContentBundlePaths.h:11
constexpr FStringView ContentBundleAssetRegistryTagString
Definition ContentBundlePaths.h:13
constexpr FStringView GetContentBundleFolderName()
Definition ContentBundlePaths.h:19
FString GetRelativeLevelFolder(const FContentBundleBase &ContentBundle)
Definition ContentBundlePaths.cpp:79
ENGINE_API TArray< FGuid > ParseContentBundleGuids(const FString &GuidsStr)
Definition ContentBundlePaths.cpp:47
constexpr FStringView GetGeneratedFolderName()
Definition ContentBundlePaths.h:29
ENGINE_API void AddRegistryTags(FAssetRegistryTagsContext Context, TArray< FGuid > &ContentBundleGuids)
Definition ContentBundlePaths.cpp:25
FString GetCookedContentBundleLevelFolder(const FContentBundleBase &ContentBundle)
Definition ContentBundlePaths.cpp:65
ENGINE_API void ForEachContentBundleLevelPackagePath(const FString &InLevelPackageName, TFunctionRef< void(const FString &)> Func)
constexpr FStringView GeneratedFolder
Definition ContentBundlePaths.h:12
constexpr FStringView GetGeneratedFolder()
Definition ContentBundlePaths.h:26
Definition ContentBundleLog.cpp:15
Definition AssetData.h:162
Definition Guid.h:109