RigVM.UInterfaceSupport
RigVM.UInterfaceSupport
#Overview
name: RigVM.UInterfaceSupport
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When true the RigVMCompiler will allow UInterfaces.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of RigVM.UInterfaceSupport is to control whether the RigVM compiler allows UInterfaces. This setting variable is part of the RigVM system, which is a runtime virtual machine for executing rigging and animation logic in Unreal Engine.
The RigVM module, which is a plugin in the Unreal Engine, relies on this setting variable. It’s specifically used within the RigVM compiler to determine if UInterfaces should be supported.
The value of this variable is set as a console variable (CVar) using TAutoConsoleVariable. It’s initialized with a default value of true, meaning UInterface support is enabled by default.
This variable interacts directly with its associated variable CVarRigVMEnableUInterfaces. They share the same value and are essentially two ways to reference the same setting.
Developers must be aware that this variable is only effective when the UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED macro is defined. If this macro is not defined, UInterface support will always be disabled regardless of this setting.
Best practices when using this variable include:
- Ensure the UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED macro is defined if you intend to use UInterfaces in RigVM.
- Be aware that changing this setting at runtime will affect the behavior of the RigVM compiler.
- Consider the performance implications of enabling UInterface support, as it may introduce additional overhead in the RigVM compilation process.
Regarding the associated variable CVarRigVMEnableUInterfaces:
The purpose of CVarRigVMEnableUInterfaces is to provide programmatic access to the RigVM.UInterfaceSupport setting within C++ code. It’s used to retrieve the current value of the setting, particularly in the SupportsUInterfaces function of the RigVMCore namespace.
This variable is used in the RigVM module to determine at runtime whether UInterface support is enabled. The SupportsUInterfaces function, which uses this variable, likely serves as a central point for other parts of the RigVM system to check if UInterface functionality should be used.
The value of CVarRigVMEnableUInterfaces is set indirectly through the RigVM.UInterfaceSupport console variable. It’s not set directly in the code provided.
Developers should be aware that accessing CVarRigVMEnableUInterfaces.GetValueOnAnyThread() will return the current state of UInterface support, which can be changed at runtime through the console variable.
Best practices for using CVarRigVMEnableUInterfaces include:
- Use the SupportsUInterfaces function rather than accessing the CVar directly when checking for UInterface support.
- Be prepared to handle both cases (enabled and disabled UInterface support) in code that depends on this setting.
- Consider caching the result of SupportsUInterfaces if it’s checked frequently, as GetValueOnAnyThread() may have some overhead.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMModule.cpp:29
Scope: file
Source code excerpt:
#if UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED
TAutoConsoleVariable<bool> CVarRigVMEnableUInterfaces(TEXT("RigVM.UInterfaceSupport"), true, TEXT("When true the RigVMCompiler will allow UInterfaces."));
#endif
void FRigVMModule::StartupModule()
{
#if WITH_EDITOR
// Register the details customizer
#Associated Variable and Callsites
This variable is associated with another variable named CVarRigVMEnableUInterfaces
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMModule.cpp:29
Scope: file
Source code excerpt:
#if UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED
TAutoConsoleVariable<bool> CVarRigVMEnableUInterfaces(TEXT("RigVM.UInterfaceSupport"), true, TEXT("When true the RigVMCompiler will allow UInterfaces."));
#endif
void FRigVMModule::StartupModule()
{
#if WITH_EDITOR
// Register the details customizer
#Loc: <Workspace>/Engine/Plugins/Runtime/RigVM/Source/RigVM/Private/RigVMModule.cpp:66
Scope (from outer to inner):
file
function bool RigVMCore::SupportsUInterfaces
Source code excerpt:
{
#if UE_RIGVM_UINTERFACE_PROPERTIES_ENABLED
return CVarRigVMEnableUInterfaces.GetValueOnAnyThread();
#else
return false;
#endif
}