EngineAssetPaths
EngineAssetPaths
#Overview
name: EngineAssetPaths
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 EngineAssetPaths is to store a list of file paths to engine assets that need to be cooked for the game. This variable is primarily used in the context of the Unreal Engine’s cooking process, which prepares assets for distribution in a game.
The EngineAssetPaths 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 this variable is set by calling the GetConfigArray function with the argument “EngineAssetPaths”. This suggests that the paths are defined in a configuration file, likely an INI file.
EngineAssetPaths interacts with other variables in the FIniCookedEditorPackageManager class, such as ProjectAssetPaths, DisallowedPathsToGather, and DisabledPlugins. These variables work together to determine which assets should be included or excluded during the cooking process.
Developers should be aware that this variable directly influences which engine assets are included in the cooked game. Modifying this list can have significant impacts on the final game package size and content.
Best practices when using this variable include:
- Regularly reviewing and updating the list of engine asset paths to ensure all necessary assets are included.
- Avoiding the inclusion of unnecessary engine assets to keep the game package size optimized.
- Coordinating changes to this variable with the project’s asset management strategy.
- Ensuring that the paths listed are valid and exist within the engine’s directory structure.
- Using version control to track changes to the configuration files that set this variable.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:247, section: [CookedEditorSettings]
- INI Section:
CookedEditorSettings
- Raw value:
"/Engine"
- 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:91
Scope (from outer to inner):
file
function FIniCookedEditorPackageManager::FIniCookedEditorPackageManager
Source code excerpt:
: bIsCookedCooker(bInIsCookedCooker)
{
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)
#Loc: <Workspace>/Engine/Source/Developer/CookedEditor/Private/CookedEditorPackageManager.cpp:158
Scope (from outer to inner):
file
function void FIniCookedEditorPackageManager::GetEnginePackagesToCook
Source code excerpt:
void FIniCookedEditorPackageManager::GetEnginePackagesToCook(TArray<FName>& PackagesToCook) const
{
for (const FString& Path : EngineAssetPaths)
{
AddPackagesFromPath(PackagesToCook, *Path, EPackageSearchMode::Recurse);
}
// specific assets to cook
PackagesToCook.Append(GetConfigArray(TEXT("EngineSpecificAssetsToCook")));
#Loc: <Workspace>/Engine/Source/Developer/CookedEditor/Public/CookedEditorPackageManager.h:145
Scope (from outer to inner):
file
class class FIniCookedEditorPackageManager : public ICookedEditorPackageManager
Source code excerpt:
class COOKEDEDITOR_API FIniCookedEditorPackageManager : public ICookedEditorPackageManager
{
TArray<FString> EngineAssetPaths;
TArray<FString> ProjectAssetPaths;
TArray<FString> DisabledPlugins;
TArray<UClass*> DisallowedObjectClassesToLoad;
TArray<UClass*> DisallowedAssetClassesToGather;
TArray<FString> DisallowedPathsToGather;