RigVM.DisableNativizedVMs

RigVM.DisableNativizedVMs

#Overview

name: RigVM.DisableNativizedVMs

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 RigVM.DisableNativizedVMs is to control whether nativized VMs (Virtual Machines) are disabled in the RigVM system. This setting is primarily used for debugging and performance testing purposes within the RigVM module of Unreal Engine.

The RigVM subsystem, which is part of the Runtime RigVM plugin, relies on this setting variable. It’s used specifically in the URigVMHost class, which is responsible for managing and executing RigVM operations.

The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 1, meaning nativized VMs are disabled by default.

The associated variable CVarRigVMDisableNativizedVMs directly interacts with RigVM.DisableNativizedVMs. It’s a TAutoConsoleVariable that allows runtime modification of the setting.

Developers must be aware that:

  1. This setting affects the performance of RigVM operations.
  2. Disabling nativized VMs (value != 0) may result in slower execution but can be useful for debugging.
  3. Enabling nativized VMs (value == 0) can improve performance but may make debugging more challenging.

Best practices when using this variable include:

  1. Use it primarily for debugging and performance testing.
  2. Consider enabling nativized VMs in release builds for better performance.
  3. Be consistent in its usage across development and production environments to ensure consistent behavior.

Regarding the associated variable CVarRigVMDisableNativizedVMs:

When working with CVarRigVMDisableNativizedVMs, developers should:

  1. Use console commands to toggle the setting during development and testing.
  2. Be aware that changes to this variable will immediately affect the behavior of the RigVM system.
  3. Document any non-default values used in different development or production scenarios to maintain consistency.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMHost.cpp:23

Scope: file

Source code excerpt:


// CVar to disable swapping to nativized vms 
static TAutoConsoleVariable<int32> CVarRigVMDisableNativizedVMs(TEXT("RigVM.DisableNativizedVMs"), 1, TEXT("if nonzero we disable swapping to nativized VMs."));

URigVMHost::URigVMHost(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
	, DeltaTime(0.0f)
	, AbsoluteTime(0.0f)
	, FramesPerSecond(0.0f)

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMHost.cpp:23

Scope: file

Source code excerpt:


// CVar to disable swapping to nativized vms 
static TAutoConsoleVariable<int32> CVarRigVMDisableNativizedVMs(TEXT("RigVM.DisableNativizedVMs"), 1, TEXT("if nonzero we disable swapping to nativized VMs."));

URigVMHost::URigVMHost(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
	, DeltaTime(0.0f)
	, AbsoluteTime(0.0f)
	, FramesPerSecond(0.0f)

#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMHost.cpp:1004

Scope (from outer to inner):

file
function     bool URigVMHost::AreNativizedVMsDisabled

Source code excerpt:

bool URigVMHost::AreNativizedVMsDisabled()
{
	return (CVarRigVMDisableNativizedVMs->GetInt() != 0);
}

#if WITH_EDITORONLY_DATA
void URigVMHost::DeclareConstructClasses(TArray<FTopLevelAssetPath>& OutConstructClasses, const UClass* SpecificSubclass)
{
	Super::DeclareConstructClasses(OutConstructClasses, SpecificSubclass);