DisallowedPathsToGather
DisallowedPathsToGather
#Overview
name: DisallowedPathsToGather
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of DisallowedPathsToGather is to specify a list of asset paths that should be excluded from gathering during the cooking process in Unreal Engine 5.
This setting variable is primarily used in the CookedEditor module, specifically within the FIniCookedEditorPackageManager class. This class is responsible for managing packages in the cooked editor environment.
The value of DisallowedPathsToGather is set by calling the GetConfigArray function with the key “DisallowedPathsToGather”. This suggests that the values are stored in a configuration file and loaded at runtime.
DisallowedPathsToGather interacts with other variables in the FIniCookedEditorPackageManager class, such as EngineAssetPaths, ProjectAssetPaths, and DisabledPlugins. These variables work together to control which assets are included or excluded during the cooking process.
Developers must be aware that DisallowedPathsToGather is used to filter out packages during the FilterGatheredPackages function. Any asset path that starts with a string in the DisallowedPathsToGather array will be excluded from the gathering process.
Best practices when using this variable include:
- Carefully consider which paths to add to DisallowedPathsToGather to avoid accidentally excluding necessary assets.
- Use specific paths rather than broad ones to minimize unintended exclusions.
- Regularly review and update the DisallowedPathsToGather list as project requirements change.
- Coordinate with the team to ensure everyone understands which paths are being excluded and why.
- Document any changes to DisallowedPathsToGather and communicate them to the development team.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:252, section: [CookedEditorSettings]
- INI Section:
CookedEditorSettings
- Raw value:
"/Game/Developers"
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/CookedEditor/Private/CookedEditorPackageManager.cpp:93
Scope (from outer to inner):
file
function FIniCookedEditorPackageManager::FIniCookedEditorPackageManager
Source code excerpt:
EngineAssetPaths = GetConfigArray(TEXT("EngineAssetPaths"));
ProjectAssetPaths = GetConfigArray(TEXT("ProjectAssetPaths"));
DisallowedPathsToGather = GetConfigArray(TEXT("DisallowedPathsToGather"));
DisabledPlugins = GetConfigArray(TEXT("DisabledPlugins"));
TArray<FString> DisallowedObjectClassNamesToLoad = GetConfigArray(TEXT("DisallowedObjectClassesToLoad"));;
for (const FString& ClassName : DisallowedObjectClassNamesToLoad)
{
check(FPackageName::IsValidObjectPath(ClassName));
#Loc: <Workspace>/Engine/Source/Developer/CookedEditor/Private/CookedEditorPackageManager.cpp:144
Scope (from outer to inner):
file
function void FIniCookedEditorPackageManager::FilterGatheredPackages
lambda-function
Source code excerpt:
FNameBuilder AssetPathBuilder(AssetPath);
const FStringView AssetPathView(AssetPathBuilder);
for (const FString& Path : DisallowedPathsToGather)
{
if (AssetPathView.StartsWith(Path))
{
return true;
}
}
#Loc: <Workspace>/Engine/Source/Developer/CookedEditor/Public/CookedEditorPackageManager.h:150
Scope (from outer to inner):
file
class class FIniCookedEditorPackageManager : public ICookedEditorPackageManager
Source code excerpt:
TArray<UClass*> DisallowedObjectClassesToLoad;
TArray<UClass*> DisallowedAssetClassesToGather;
TArray<FString> DisallowedPathsToGather;
// true if this is a cooked cooker (false for cooker editor)
bool bIsCookedCooker;
// gets an array from two sections, depending on bIsCookedCooker setting
TArray<FString> GetConfigArray(const TCHAR* Key) const;