SkipOnlyEditorOnly
SkipOnlyEditorOnly
#Overview
name: SkipOnlyEditorOnly
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 5
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of SkipOnlyEditorOnly is to control whether editor-only content should be skipped during the cooking process in Unreal Engine 5. This setting is primarily used in the cooking and packaging system of the engine.
This setting variable is mainly relied upon by the cooking subsystem, specifically within the UCookOnTheFlyServer class and related components in the UnrealEd module.
The value of this variable is set in multiple ways:
- It’s initially set to false.
- It can be configured in the GEditorIni file under the [CookSettings] section.
- It can be overridden via command-line parameters (-SkipOnlyEditorOnly).
- It’s forcibly set to true when HiddenDependenciesDebug is enabled.
This variable interacts with other cooking-related variables and flags, such as SAVE_KeepEditorOnlyCookedPackages and bOnlyEditorOnlyDebug.
Developers must be aware that:
- This setting affects what content is included in cooked packages.
- It has implications for hidden dependencies in the project.
- Changing this setting may impact the size and content of the final packaged game.
Best practices when using this variable include:
- Carefully consider the implications of skipping editor-only content, especially for debugging purposes.
- Use it in conjunction with other cooking settings to achieve the desired balance between package size and included content.
- Be consistent in its usage across different build configurations to avoid unexpected behavior.
- When debugging hidden dependencies, be aware that this flag is forcibly enabled.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditor.ini:332, section: [CookSettings]
- INI Section:
CookSettings
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/CookOnTheFlyServer.cpp:6260
Scope (from outer to inner):
file
namespace UE::Cook
function void FSaveCookedPackageContext::SetupPackage
Source code excerpt:
// MPCOOKTODO: it also doesn't work in multiprocess cooking, because GetPackage()->IsLoadedByEditorPropertiesOnly()
// might have been set to false on a CookWorker and is not replicated. Rather than fixing this, we should delete
// the feature and instead use SkipOnlyEditorOnly.
bCanSkipEditorOnlyPackages &= !COTFS.CookDirector.IsValid() && !COTFS.CookWorkerClient.IsValid();
SaveFlags |= bCanSkipEditorOnlyPackages ? SAVE_None : SAVE_KeepEditorOnlyCookedPackages;
// Use SandboxFile to do path conversion to properly handle sandbox paths (outside of standard paths in particular).
Filename = COTFS.ConvertToFullSandboxPath(*Filename, true);
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/CookOnTheFlyServer.cpp:7009
Scope (from outer to inner):
file
function void UCookOnTheFlyServer::SetInitializeConfigSettings
Source code excerpt:
bOnlyEditorOnlyDebug = FParse::Param(FCommandLine::Get(), TEXT("OnlyEditorOnlyDebug"));
bSkipOnlyEditorOnly = false;
GConfig->GetBool(TEXT("CookSettings"), TEXT("SkipOnlyEditorOnly"), bSkipOnlyEditorOnly, GEditorIni);
FString ParamText;
if (FParse::Value(FCommandLine::Get(), TEXT("-SkipOnlyEditorOnly="), ParamText))
{
LexFromString(bSkipOnlyEditorOnly, *ParamText);
}
else if (FParse::Param(FCommandLine::Get(), TEXT("SkipOnlyEditorOnly")))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/CookOnTheFlyServer.cpp:7031
Scope (from outer to inner):
file
function void UCookOnTheFlyServer::SetInitializeConfigSettings
Source code excerpt:
UE_LOG(LogCook, Display, TEXT("HiddenDependenciesDebug is enabled."));
// HiddenDependencies diagnostics rely on using SkipOnlyEditorOnly
bSkipOnlyEditorOnly = true;
FScopeLock HiddenDependenciesScopeLock(&HiddenDependenciesLock);
FString ClassPathListStr;
TOptional<bool> bAllowList;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Cooker/CookDiagnostics.cpp:130
Scope (from outer to inner):
file
namespace UE::Cook
function void FDiagnostics::AnalyzeHiddenDependencies
Source code excerpt:
{
// Dependencies are only hidden if they're detected as Unsolicited; other instigator types
// are reported only for comparing SkipOnlyEditorOnly to legacy WhatGetsCooked rules.
continue;
}
FName UnsolicitedPackageName = Unsolicited->GetPackageName();
// If the package is not cookable on any of the platforms we are cooking, then even though it was loaded
// it will not be cooked by LegacyWhatShouldBeCooked. Remove it from our list to investigate.
#Loc: <Workspace>/Engine/Source/Runtime/Core/Public/UObject/FortniteReleaseBranchCustomObjectVersion.h:42
Scope: file
Source code excerpt:
WorldPartitionRuntimeCellGuidWithCellSize,
// Enable SkipOnlyEditorOnly style cooking of NaniteOverrideMaterial
NaniteMaterialOverrideUsesEditorOnly,
// Store game thread particles data in single precision
SinglePrecisonParticleData,
// UPCGPoint custom serialization