AllowAsyncRenderThreadUpdatesEditor
AllowAsyncRenderThreadUpdatesEditor
#Overview
name: AllowAsyncRenderThreadUpdatesEditor
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Used to control async renderthread updates in the editor.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of AllowAsyncRenderThreadUpdatesEditor is to control asynchronous render thread updates specifically in the Unreal Engine editor environment. This setting variable is part of the rendering system and is used to manage the behavior of render thread updates when working within the editor.
The Unreal Engine subsystem that relies on this setting variable is primarily the rendering system, particularly the component of the engine that handles render thread updates in the editor context. This can be inferred from its usage in the LevelTick.cpp file, which is part of the Engine module.
The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 0, indicating that async render thread updates in the editor are disabled by default.
The associated variable CVarAllowAsyncRenderThreadUpdatesEditor interacts directly with AllowAsyncRenderThreadUpdatesEditor. They share the same value and purpose, with CVarAllowAsyncRenderThreadUpdatesEditor being the actual console variable implementation.
Developers must be aware that this variable specifically affects the editor environment, not the runtime game. It’s used to determine whether certain component updates should be forced to occur on the game thread or allowed to happen asynchronously on the render thread.
Best practices when using this variable include:
- Carefully consider the implications of enabling async render thread updates in the editor, as it may affect editor performance and stability.
- Use it in conjunction with profiling tools to determine if enabling async updates improves editor performance in your specific use case.
- Be aware that changing this setting may impact the behavior and performance of custom editor tools or plugins that interact with the render thread.
Regarding the associated variable CVarAllowAsyncRenderThreadUpdatesEditor:
The purpose of CVarAllowAsyncRenderThreadUpdatesEditor is to provide a console-accessible way to control the AllowAsyncRenderThreadUpdatesEditor setting. It’s the actual implementation of the console variable that developers can modify at runtime.
This variable is part of the engine’s console variable system, which allows for runtime configuration of various engine parameters. It’s specifically used in the rendering system to control async render thread behavior in the editor.
The value of this variable is set through the console or can be modified programmatically. Its default value is 0, matching the AllowAsyncRenderThreadUpdatesEditor setting.
CVarAllowAsyncRenderThreadUpdatesEditor directly interacts with the AllowAsyncRenderThreadUpdatesEditor setting, effectively controlling its value.
Developers should be aware that changes to this console variable will immediately affect the editor’s render thread behavior. It’s queried using the GetValueOnAnyThread() method, which suggests that its value can be safely read from any thread.
Best practices for using this variable include:
- Use it for debugging or performance testing in the editor environment.
- Document any changes made to this variable in project settings or documentation to ensure consistency across the development team.
- Consider exposing this setting in a user-friendly way if it’s frequently adjusted for your project’s specific needs.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelTick.cpp:788
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarAllowAsyncRenderThreadUpdatesEditor(
TEXT("AllowAsyncRenderThreadUpdatesEditor"),
0,
TEXT("Used to control async renderthread updates in the editor."));
namespace EComponentMarkedForEndOfFrameUpdateState
{
enum Type
#Associated Variable and Callsites
This variable is associated with another variable named CVarAllowAsyncRenderThreadUpdatesEditor
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelTick.cpp:787
Scope: file
Source code excerpt:
TEXT("Used to control async renderthread updates in an editor game world."));
static TAutoConsoleVariable<int32> CVarAllowAsyncRenderThreadUpdatesEditor(
TEXT("AllowAsyncRenderThreadUpdatesEditor"),
0,
TEXT("Used to control async renderthread updates in the editor."));
namespace EComponentMarkedForEndOfFrameUpdateState
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/LevelTick.cpp:915
Scope (from outer to inner):
file
function void UWorld::MarkActorComponentForNeededEndOfFrameUpdate
Source code excerpt:
else
{
bForceGameThread = !CVarAllowAsyncRenderThreadUpdatesEditor.GetValueOnAnyThread();
}
#else
bForceGameThread = !CVarAllowAsyncRenderThreadUpdates.GetValueOnAnyThread();
#endif
}