VA.DisableSystem

VA.DisableSystem

#Overview

name: VA.DisableSystem

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.DisableSystem is to provide a way to disable the Virtualization System in Unreal Engine 5. This setting variable is part of the engine’s virtualization subsystem, which is likely used for managing virtual assets or resources.

The Unreal Engine subsystem that relies on this setting variable is the Virtualization System, as evident from the namespace UE::Virtualization and the log message mentioning “virtualization system”.

The value of this variable is set through a console variable (CVar) system. It’s initialized as a static TAutoConsoleVariable with a default value of false, meaning the system is enabled by default.

This variable interacts with an associated variable named CVarDisableSystem. They share the same value and purpose, with CVarDisableSystem being the C++ representation of the console variable.

Developers must be aware that when this variable is set to true, the Virtualization System will be disabled as though the ‘SystemName’ was set to ‘None’. This could have significant implications for asset loading and management in the engine.

Best practices when using this variable include:

  1. Only disable the system if absolutely necessary, as it may impact performance or functionality.
  2. Be aware of the potential side effects on asset loading and management when disabling the system.
  3. Use it for debugging or testing purposes, but avoid leaving it disabled in production builds.

Regarding the associated variable CVarDisableSystem:

The purpose of CVarDisableSystem is to provide programmatic access to the VA.DisableSystem console variable within the C++ code.

It’s used in the UE::Virtualization namespace, specifically in the FindSystemToMount function, to check if the virtualization system should be disabled.

The value of CVarDisableSystem is set by the console variable system, mirroring the value of VA.DisableSystem.

It interacts directly with the VA.DisableSystem console variable, serving as its C++ representation.

Developers should be aware that checking CVarDisableSystem.GetValueOnAnyThread() will return the current state of the VA.DisableSystem setting.

Best practices for using CVarDisableSystem include:

  1. Use it for conditional logic in C++ code where you need to check if the virtualization system is disabled.
  2. Be cautious about caching its value, as it can be changed at runtime through the console variable system.
  3. Consider the performance implications of frequent checks, especially in performance-critical code paths.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Virtualization/VirtualizationSystem.cpp:38

Scope (from outer to inner):

file
namespace    UE::Virtualization

Source code excerpt:


static TAutoConsoleVariable<bool> CVarDisableSystem(
	TEXT("VA.DisableSystem"),
	false,
	TEXT("When true the VA system will be disabled as though 'SystemName' was 'None'"));

static TAutoConsoleVariable<bool> CVarLazyInitSystem(
	TEXT("VA.LazyInitSystem"),
	false,

#Associated Variable and Callsites

This variable is associated with another variable named CVarDisableSystem. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Virtualization/VirtualizationSystem.cpp:37

Scope (from outer to inner):

file
namespace    UE::Virtualization

Source code excerpt:

{

static TAutoConsoleVariable<bool> CVarDisableSystem(
	TEXT("VA.DisableSystem"),
	false,
	TEXT("When true the VA system will be disabled as though 'SystemName' was 'None'"));

static TAutoConsoleVariable<bool> CVarLazyInitSystem(
	TEXT("VA.LazyInitSystem"),

#Loc: <Workspace>/Engine/Source/Runtime/Core/Private/Virtualization/VirtualizationSystem.cpp:248

Scope (from outer to inner):

file
namespace    UE::Virtualization
function     FName FindSystemToMount

Source code excerpt:

		return FName();
	}
	else if (CVarDisableSystem.GetValueOnAnyThread())
	{
		UE_LOG(LogVirtualization, Display, TEXT("The virtualization system has been disabled by cvar"));
		return FName();
	}
	else
	{