VA.AllowPkgVirtualization

VA.AllowPkgVirtualization

#Overview

name: VA.AllowPkgVirtualization

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

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of VA.AllowPkgVirtualization is to control the virtualization process for packages in the Unreal Engine editor. It is a setting variable used in the virtualization system of Unreal Engine 5.

This setting variable is primarily used by the Virtualization module in Unreal Engine. It is referenced in the VirtualizationManager.cpp file, which is part of the Virtualization subsystem.

The value of this variable is set through a console variable (CVar) system. It is initially defined as a static FAutoConsoleVariable with a default value of true. Later, it is registered as a console variable reference (RegisterConsoleVariableRef) linked to the bAllowPackageVirtualization member of the FVirtualizationManager class.

The VA.AllowPkgVirtualization variable interacts with the bAllowPackageVirtualization member of the FVirtualizationManager class. When the console variable changes, it updates this member variable.

Developers must be aware that this variable controls whether package virtualization is triggered during the package submission process in the editor. When set to true, it prevents the virtualization process from occurring during package submission.

Best practices for using this variable include:

  1. Understanding the implications of enabling or disabling package virtualization in your project.
  2. Using it judiciously, as it affects the editor’s behavior during package submission.
  3. Considering performance and storage implications when changing this setting.
  4. Documenting any changes to this variable in project settings or team guidelines.
  5. Testing the impact of changing this variable on your specific project’s workflow before applying it in production environments.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:199, section: [WindowsCookedEditor DeviceProfile]

Location: <Workspace>/Engine/Config/BaseDeviceProfiles.ini:1218, section: [LinuxCookedEditor DeviceProfile]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Developer/Virtualization/Private/VirtualizationManager.cpp:51

Scope (from outer to inner):

file
namespace    UE::Virtualization

Source code excerpt:


static FAutoConsoleVariable CVarAllowPkgVirtualization(
	TEXT("VA.AllowPkgVirtualization"),
	true,
	TEXT("When true submitting packages in the editor will no longer trigger the virtualization process")
);

#endif // UE_USE_GLOBAL_CVAR

#Loc: <Workspace>/Engine/Source/Developer/Virtualization/Private/VirtualizationManager.cpp:1349

Scope (from outer to inner):

file
namespace    UE::Virtualization
function     void FVirtualizationManager::RegisterConsoleCommands

Source code excerpt:

	{
#if UE_USE_GLOBAL_CVAR
		IConsoleVariable* Handle = IConsoleManager::Get().FindConsoleVariable(TEXT("VA.AllowPkgVirtualization"));

		if (Handle != nullptr)
		{
			auto Callback = [this](IConsoleVariable* CVar)
			{
				this->bAllowPackageVirtualization = CVar->GetBool();

#Loc: <Workspace>/Engine/Source/Developer/Virtualization/Private/VirtualizationManager.cpp:1384

Scope (from outer to inner):

file
namespace    UE::Virtualization
function     void FVirtualizationManager::RegisterConsoleCommands

Source code excerpt:


		IConsoleVariable* Handle = IConsoleManager::Get().RegisterConsoleVariableRef(
			TEXT("VA.AllowPkgVirtualization"),
			bAllowPackageVirtualization,
			TEXT("When true submitting packages in the editor will no longer trigger the virtualization process")
		);

		auto Callback = [](IConsoleVariable* CVar)
			{