bUseIoStore

bUseIoStore

#Overview

name: bUseIoStore

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 12 C++ source files. Also referenced in 1 C# build file meaning it may affect the build system logic.

#Summary

#Usage in the C++ source code

The purpose of bUseIoStore is to enable the use of I/O Store, which is an optimized file container system for packaging and loading game content in Unreal Engine 5.

This setting variable is primarily used in the packaging and deployment subsystems of Unreal Engine. It is referenced in the ProjectPackagingSettings class and the LauncherProfile class, which are part of the DeveloperToolSettings and LauncherServices modules respectively.

The value of this variable is typically set in the project’s packaging settings, either through the Unreal Editor interface or in the DefaultGame.ini configuration file.

bUseIoStore interacts with several other variables, notably:

  1. bUseZenStore: If bUseZenStore is enabled, bUseIoStore must also be enabled.
  2. DeployWithUnrealPak: When bUseIoStore is true, DeployWithUnrealPak is automatically set to true.
  3. UsePakFile: When packaging, if either UsePakFile or bUseIoStore is true, the “-pak” flag is added to the build parameters.

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

  1. Enabling bUseIoStore requires the use of pak files for deployment.
  2. It’s not compatible with disabling pak files, and will cause validation errors if attempted.
  3. When enabled, it adds the “-iostore” flag to the build parameters during packaging.

Best practices for using this variable include:

  1. Always ensure that pak file usage is enabled when using I/O Store.
  2. Consider the implications on loading times and file access when enabling this feature.
  3. Test thoroughly after enabling or disabling this feature, as it significantly changes how game content is packaged and loaded.
  4. Be aware of the potential impact on different platforms, as I/O Store support may vary.
  5. Coordinate with team members when changing this setting, as it affects the entire project’s packaging and deployment process.

#Setting Variables

#References In INI files

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

Location: <Workspace>/Projects/Lyra/Config/DefaultGame.ini:95, 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:158

Scope: file

Source code excerpt:

	 *   {Platform} - Replaced with the platform name this is run for
	 *   {inivalue:Config:Section:Key} - Replaced with the value for Key in Config's Section. Ex: -archivedirectory={inivalue:Engine:CustomSettings:OverrideArchiveDir}
	 *   {iniif:Token:Config:Section:Key} - Replaced with Token if the vlaue for Key in Config's Section evaluates to True. Ex: {iniif:-iostore:/Script/UnrealEd.ProjectPackagingSettings:bUseIoStore}
	 * Because ProjectPackagingSettings is a common section to read, if Config:Section: are not specified for 'iniif' or 'inivalue', it will use the ProjectPackagingSettings settings:
	 *   {iniif:-iostore:bUseIoStore}
	 * Additionally, the ini settings can have an optional search and replace modifier, to easily modify the string. The Replace can be blank:
	 *   {inivalue:BuildConfiguration|PPBC_=} - This will get the BuildConfiguration from the settings, and then remove the PPBC_ enum prefix from the string, to just get say Development
	 */
	UPROPERTY(EditAnywhere, Category="Packaging")
	FString BuildCookRunParams;
};

/**
 * Implements the Editor's user settings.
 */
UCLASS(config=Game, defaultconfig)
class DEVELOPERTOOLSETTINGS_API UProjectPackagingSettings
	: public UObject
{
	GENERATED_UCLASS_BODY()

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

Scope (from outer to inner):

file
class        class UProjectPackagingSettings : public UObject

Source code excerpt:

	/** If enabled, use .utoc/.ucas container files for staged/packaged package data instead of pak. */
	UPROPERTY(config, EditAnywhere, Category = Packaging)
	bool bUseIoStore;

	/** If enabled, use Zen storage server for storing and fetching cooked data instead of using the local file system.  */
	UPROPERTY(config, EditAnywhere, Category = Packaging)
	bool bUseZenStore;

	/** If enabled, staging will make a binary config file for faster loading. */

#Loc: <Workspace>/Engine/Source/Developer/DeveloperToolSettings/Private/ProjectPackagingSettings.cpp:41

Scope (from outer to inner):

file
function     void UProjectPackagingSettings::PostInitProperties

Source code excerpt:

	Super::PostInitProperties();

	if (bUseZenStore && !bUseIoStore)
	{
		UE_LOG(LogProjectPackagingSettings, Warning, TEXT("bUseZenStore is enabled in your project packaging settings while bUseIoStore is disabled. "
															"This is not a supported combination.  bUseZenStore is being treated as disabled. "
															"To prevent this warning, either (preferred) set bUseIoStore=True or set bUseZenStore=False"
															"in your project packaging settings in your DefaultGame.ini"));
		bUseZenStore = false;

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:1075

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile
function     virtual bool Serialize

Source code excerpt:

		if (Version >= LAUNCHERSERVICES_ADDEDUSEIOSTORE)
		{
			Archive << bUseIoStore;
		}

		if (Version >= LAUNCHERSERVICES_ADDEDMAKEBINARYCONFIG)
		{
			Archive << bMakeBinaryConfig;
		}

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:1246

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile
function     virtual void Save

Source code excerpt:

		Writer.WriteValue("AdditionalCommandLineParameters", AdditionalCommandLineParameters);
		Writer.WriteValue("IncludePrerequisites", IncludePrerequisites);
		Writer.WriteValue("UseIoStore", bUseIoStore);
		Writer.WriteValue("MakeBinaryConfig", bMakeBinaryConfig);
		Writer.WriteValue("BuildTargetSpecified", BuildTargetSpecified);
		Writer.WriteValue("BuildTargetName", BuildTargetName);

		// serialize the default launch role
		DefaultLaunchRole->Save(Writer, TEXT("DefaultRole"));

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:1939

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile
function     virtual bool Load

Source code excerpt:

		if (Version >= LAUNCHERSERVICES_ADDEDUSEIOSTORE)
		{
			bUseIoStore = Object.GetBoolField(TEXT("UseIoStore"));
		}

		if (Version >= LAUNCHERSERVICES_ADDEDMAKEBINARYCONFIG)
		{
			bMakeBinaryConfig = Object.GetBoolField(TEXT("MakeBinaryConfig"));
		}

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:2098

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile
function     virtual void SetDefaults

Source code excerpt:


		bNotForLicensees = false;
		bUseIoStore = false;
		bUseZenStore = false;
		bShouldUpdateFlash = false;
		bIsDeviceASimulator = false;
		bMakeBinaryConfig = false;

		RefreshValidBuildTargets();

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:2597

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile
function     virtual void SetUseIoStore

Source code excerpt:

	virtual void SetUseIoStore(bool bInUseIoStore) override
	{
		bUseIoStore = bInUseIoStore;

		if (bUseIoStore)
		{
			SetDeployWithUnrealPak(true);
		}
	}

	virtual bool IsUsingIoStore() const override
	{
		return bUseIoStore;
	}

	virtual void SetUseZenStore(bool bInUseZenStore) override
	{
		bUseZenStore = bInUseZenStore;
	}

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:2826

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile
function     void Validate

Source code excerpt:

		}

		if (bUseIoStore && !DeployWithUnrealPak)
		{
			ValidationErrors.Add(ELauncherProfileValidationErrors::IoStoreRequiresPakFiles);
		}

		ValidateBuildTarget();
		ValidatePlatformSDKs();

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Private/Profiles/LauncherProfile.h:3256

Scope (from outer to inner):

file
class        class FLauncherProfile final : public ILauncherProfile

Source code excerpt:


	// Use I/O store.
	bool bUseIoStore;
	
	// Use Zen storage server
	bool bUseZenStore;

	// Make binary config.
	bool bMakeBinaryConfig;

#Loc: <Workspace>/Engine/Source/Developer/LauncherServices/Public/ILauncherProfile.h:1344

Scope (from outer to inner):

file
class        class ILauncherProfile

Source code excerpt:

	/**
	 * Sets whether to use I/O store for optimized loading.
	 * @param bUseIoStore Whether to use I/O store
	 */
	virtual void SetUseIoStore(bool bUseIoStore) = 0;

	/**
	 * Using I/O store or not.
	 *
	 * @return true if using I/O store
	 */
	virtual bool IsUsingIoStore() const = 0;

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

Scope (from outer to inner):

file
class        class FTurnkeySupportCallbacks
function     static void CookOrPackage

Source code excerpt:


			// Pak file(s) must be used when using container file(s)
			if (PackagingSettings->UsePakFile || PackagingSettings->bUseIoStore)
			{
				BuildCookRunParams += TEXT(" -pak");
				if (PackagingSettings->bUseIoStore)
				{
					BuildCookRunParams += TEXT(" -iostore");
				}

				if (PackagingSettings->bCompressed)
				{

#References in C# build files

This variable is referenced in the following C# build files:

Location: <Workspace>/Engine/Source/Programs/AutomationTool/Scripts/CopyBuildToStagingDirectory.Automation.cs:4689

			ConfigHierarchy PlatformGameConfig = ConfigCache.ReadHierarchy(ConfigHierarchyType.Game, DirectoryReference.FromFile(Params.RawProjectPath), SC.StageTargetPlatform.IniPlatformType, SC.CustomConfig);
			bool bUseIoStore = false;
			PlatformGameConfig.GetBool("/Script/UnrealEd.ProjectPackagingSettings", "bUseIoStore", out bUseIoStore);
			return bUseIoStore;
		}

		private static bool ShouldCreatePak(ProjectParams Params, DeploymentContext SC)
		{
			if (Params.CookOnTheFly)