Concert.DelayTransactionsWhileEditing
Concert.DelayTransactionsWhileEditing
#Overview
name: Concert.DelayTransactionsWhileEditing
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Focus is lost by the editor when a transaction is applied. This variable suspends applying a transaction until the user has removed focus on editable UI.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Concert.DelayTransactionsWhileEditing is to control whether transactions should be delayed while the user is editing in the Unreal Engine editor. This setting is designed to prevent focus loss in the editor when a transaction is applied.
-
This setting variable is primarily used by the Concert plugin, specifically within the ConcertSyncClient module. It’s part of the collaborative editing and synchronization system in Unreal Engine.
-
The value of this variable is set as a console variable (CVar) with an initial value of 0. It can be changed at runtime through the console or configuration files.
-
This variable interacts closely with another console variable named CVarDelayApplyingTransactionsWaitTimeout, which sets a timeout for delayed transactions.
-
Developers must be aware that enabling this feature (by setting the value to > 0) will cause transactions to be suspended until the user removes focus from editable UI elements. This can affect the real-time collaboration experience and the timing of when changes are applied.
-
Best practices when using this variable include:
- Consider the trade-off between preventing focus loss and potential delays in applying transactions.
- If enabled, carefully tune the CVarDelayApplyingTransactionsWaitTimeout to prevent transactions from stacking up for too long.
- Test thoroughly in a collaborative environment to ensure it doesn’t negatively impact the user experience or synchronization process.
Regarding the associated variable CVarDelayApplyingTransactionsWhileEditing:
- Its purpose is to implement the functionality defined by Concert.DelayTransactionsWhileEditing.
- It’s used within the ConcertSyncClientUtil namespace in the ConcertSyncClient module.
- The value is set to 0 by default but can be changed at runtime.
- It’s checked in the ShouldDelayTransaction function to determine if a transaction should be delayed.
- Developers should be aware that this variable directly controls the behavior of transaction delays and should be used in conjunction with Concert.DelayTransactionsWhileEditing.
- Best practices include using this variable for fine-tuning the delay behavior in development and debugging scenarios, and ensuring it’s properly documented for other developers working on the project.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertSyncClientUtil.cpp:51
Scope (from outer to inner):
file
namespace ConcertSyncClientUtil
Source code excerpt:
static TAutoConsoleVariable<int32> CVarDelayApplyingTransactionsWhileEditing(
TEXT("Concert.DelayTransactionsWhileEditing"), 0,
TEXT("Focus is lost by the editor when a transaction is applied. This variable suspends applying a transaction until the user has removed focus on editable UI."));
static TAutoConsoleVariable<int32> CVarDelayApplyingTransactionsWaitTimeout(
TEXT("Concert.DelayTransactionsWhileEditingTimeout"), 5,
TEXT("When Concert.DelayTransactionsWhileEditing is enabled we make sure the user has not been idle too long to prevent transactions from stacking up. The timeout value is specified in seconds."));
#Associated Variable and Callsites
This variable is associated with another variable named CVarDelayApplyingTransactionsWhileEditing
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertSyncClientUtil.cpp:50
Scope (from outer to inner):
file
namespace ConcertSyncClientUtil
Source code excerpt:
{
static TAutoConsoleVariable<int32> CVarDelayApplyingTransactionsWhileEditing(
TEXT("Concert.DelayTransactionsWhileEditing"), 0,
TEXT("Focus is lost by the editor when a transaction is applied. This variable suspends applying a transaction until the user has removed focus on editable UI."));
static TAutoConsoleVariable<int32> CVarDelayApplyingTransactionsWaitTimeout(
TEXT("Concert.DelayTransactionsWhileEditingTimeout"), 5,
TEXT("When Concert.DelayTransactionsWhileEditing is enabled we make sure the user has not been idle too long to prevent transactions from stacking up. The timeout value is specified in seconds."));
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertSyncClientUtil.cpp:86
Scope (from outer to inner):
file
namespace ConcertSyncClientUtil
function bool ShouldDelayTransaction
Source code excerpt:
{
#if WITH_EDITOR
if (CVarDelayApplyingTransactionsWhileEditing.GetValueOnAnyThread() > 0)
{
static FName SEditableTextType(TEXT("SEditableText"));
static FName SMultiLineEditableTextType(TEXT("SMultiLineEditableText"));
const bool bIsEditing = IsUserEditing();
if (bIsEditing)