bSkipEditorContent

bSkipEditorContent

#Overview

name: bSkipEditorContent

The value of this variable can be defined or overridden in .ini config files. 2 .ini config files referencing this setting variable.

It is referenced in 6 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bSkipEditorContent is to control whether editor-specific content is included in the cooking or packaging process of an Unreal Engine 5 project. This setting is primarily used in the packaging and cooking systems of the engine.

This setting variable is relied upon by the following Unreal Engine subsystems and modules:

  1. Project Packaging System (ProjectPackagingSettings)
  2. Turnkey Support Module
  3. Cook Commandlet (UCookCommandlet)

The value of this variable is typically set in the Project Packaging Settings, which can be accessed through the project settings in the Unreal Editor. It’s defined as a config property, meaning it can also be set in configuration files.

This variable interacts with other cooking and packaging related variables and flags, such as:

Developers must be aware of the following when using this variable:

  1. When set to true, it excludes editor-specific content from the cooking process, which can reduce the size of the final packaged game.
  2. It may affect the availability of certain editor-only assets in the packaged build.
  3. It’s particularly useful for reducing package size for shipping builds where editor content is not needed.

Best practices when using this variable include:

  1. Enable it for shipping builds to reduce package size and exclude unnecessary editor content.
  2. Ensure that no critical game content is inadvertently placed in editor-only folders.
  3. Test the packaged build thoroughly after enabling this option to ensure no required content is missing.
  4. Consider leaving it disabled during development and testing phases to have access to all content.
  5. Use in conjunction with other packaging settings to optimize the build process and output.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseGame.ini:111, section: [/Script/UnrealEd.ProjectPackagingSettings]

Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:143, section: [/Script/UnrealEd.ProjectPackagingSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Classes/Settings/ProjectPackagingSettings.h:511

Scope (from outer to inner):

file
class        class UProjectPackagingSettings : public UObject

Source code excerpt:

	 */
	UPROPERTY(config, EditAnywhere, Category = Packaging, AdvancedDisplay, meta = (DisplayName = "Exclude editor content when cooking"))
	bool bSkipEditorContent;

	/**
	 * Don't include movies by default when staging/packaging
	 * Specific movies can be specified below, and this can be in a platform ini
	 */
	UPROPERTY(config, EditAnywhere, Category = Packaging, AdvancedDisplay, meta = (DisplayName = "Exclude movie files when staging"))

#Loc: <Workspace>/Engine/Source/Editor/TurnkeySupport/Private/TurnkeySupportModule.cpp:362

Scope (from outer to inner):

file
class        class FTurnkeySupportCallbacks
function     static void CookOrPackage

Source code excerpt:


		// optional settings
		if (PackagingSettings->bSkipEditorContent)
		{
			BuildCookRunParams += TEXT(" -SkipCookingEditorContent");
		}
		if (FDerivedDataCacheInterface* DDC = TryGetDerivedDataCache())
		{
			const TCHAR* GraphName = DDC->GetGraphName();

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Commandlets/CookCommandlet.h:41

Scope (from outer to inner):

file
class        class UCookCommandlet : public UCommandlet

Source code excerpt:

	bool bCookAll;
	/** Skip saving any packages in Engine/Content/Editor* UNLESS TARGET HAS EDITORONLY DATA (in which case it will save those anyway) */
	bool bSkipEditorContent;
	/** Save all cooked packages without versions. These are then assumed to be current version on load. This is dangerous but results in smaller patch sizes. */
	bool bUnversioned;
	/** Produce editor optional package output when cooking. */
	bool bCookEditorOptional;
	/** Generate manifests for building streaming install packages */
	bool bGenerateStreamingInstallManifests;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/CookCommandlet.cpp:93

Scope (from outer to inner):

file
function     bool UCookCommandlet::CookOnTheFly

Source code excerpt:

	ECookInitializationFlags CookFlags = ECookInitializationFlags::None;
	CookFlags |= bIterativeCooking ? IterateFlags : ECookInitializationFlags::None;
	CookFlags |= bSkipEditorContent ? ECookInitializationFlags::SkipEditorContent : ECookInitializationFlags::None;
	CookFlags |= bUnversioned ? ECookInitializationFlags::Unversioned : ECookInitializationFlags::None;
	CookFlags |= bCookEditorOptional ? ECookInitializationFlags::CookEditorOptional : ECookInitializationFlags::None;
	CookFlags |= bIgnoreIniSettingsOutOfDate || CookerSettings->bIgnoreIniSettingsOutOfDateForIteration ? ECookInitializationFlags::IgnoreIniSettingsOutOfDate : ECookInitializationFlags::None;
	CookOnTheFlyServer->Initialize( ECookMode::CookOnTheFly, CookFlags );

	UCookOnTheFlyServer::FCookOnTheFlyStartupOptions CookOnTheFlyStartupOptions;

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/CookCommandlet.cpp:180

Scope (from outer to inner):

file
function     int32 UCookCommandlet::Main

Source code excerpt:

	bGenerateStreamingInstallManifests = Switches.Contains(TEXT("MANIFESTS"));   // Generate manifests for building streaming install packages
	bIterativeCooking = Switches.Contains(TEXT("ITERATE")) || Switches.Contains(TEXT("ITERATIVE"));
	bSkipEditorContent = Switches.Contains(TEXT("SKIPEDITORCONTENT")); // This won't save out any packages in Engine/Content/Editor*
	bErrorOnEngineContentUse = Switches.Contains(TEXT("ERRORONENGINECONTENTUSE"));
	bCookSinglePackage = Switches.Contains(TEXT("cooksinglepackagenorefs"));
	bKeepSinglePackageRefs = Switches.Contains(TEXT("cooksinglepackage")); // This is a legacy parameter; it's a minor misnomer since singlepackage implies norefs, but we want to avoiding changing the behavior
	bCookSinglePackage = bCookSinglePackage || bKeepSinglePackageRefs;
	bVerboseCookerWarnings = Switches.Contains(TEXT("verbosecookerwarnings"));
	bPartialGC = Switches.Contains(TEXT("Partialgc"));

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/CookCommandlet.cpp:272

Scope (from outer to inner):

file
function     bool UCookCommandlet::CookByTheBook

Source code excerpt:

	ECookInitializationFlags CookFlags = ECookInitializationFlags::IncludeServerMaps;
	CookFlags |= bIterativeCooking ? IterateFlags : ECookInitializationFlags::None;
	CookFlags |= bSkipEditorContent ? ECookInitializationFlags::SkipEditorContent : ECookInitializationFlags::None;
	CookFlags |= bUnversioned ? ECookInitializationFlags::Unversioned : ECookInitializationFlags::None;
	CookFlags |= bCookEditorOptional ? ECookInitializationFlags::CookEditorOptional : ECookInitializationFlags::None;
	CookFlags |= bVerboseCookerWarnings ? ECookInitializationFlags::OutputVerboseCookerWarnings : ECookInitializationFlags::None;
	CookFlags |= bPartialGC ? ECookInitializationFlags::EnablePartialGC : ECookInitializationFlags::None;
	CookFlags |= Switches.Contains(TEXT("TestCook")) ? ECookInitializationFlags::TestCook : ECookInitializationFlags::None;
	CookFlags |= Switches.Contains(TEXT("LogDebugInfo")) ? ECookInitializationFlags::LogDebugInfo : ECookInitializationFlags::None;