Concert.EnableUnrelatedTimelineSync

Concert.EnableUnrelatedTimelineSync

#Overview

name: Concert.EnableUnrelatedTimelineSync

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 Concert.EnableUnrelatedTimelineSync is to enable synchronization of timelines between unrelated Sequencers on remote machines when a Sequencer state event is received. This setting is primarily used for the Sequencer system within Unreal Engine’s Concert plugin, which is part of the collaborative editing and multi-user features.

The Unreal Engine subsystem that relies on this setting variable is the Concert plugin, specifically the ConcertSyncClient module. This can be seen from the file path where the variable is defined and used.

The value of this variable is set as a console variable (CVar) with an initial value of 0, meaning it’s disabled by default. It can be changed at runtime through console commands or programmatically.

The associated variable CVarEnableUnrelatedTimelineSync interacts directly with Concert.EnableUnrelatedTimelineSync. It’s the actual TAutoConsoleVariable object that holds and manages the value of the setting.

Developers must be aware that this variable affects the behavior of Sequencer synchronization across different instances of the engine, potentially on different machines. Enabling this feature could impact performance and network traffic, especially in scenarios with many Sequencers or frequent state changes.

Best practices when using this variable include:

  1. Only enable it when necessary for collaborative work on Sequencers.
  2. Be mindful of potential performance implications in large projects or with many collaborators.
  3. Ensure all collaborating instances have consistent settings to avoid unexpected behavior.

Regarding the associated variable CVarEnableUnrelatedTimelineSync:

The purpose of CVarEnableUnrelatedTimelineSync is to provide programmatic access to the Concert.EnableUnrelatedTimelineSync setting within the C++ code.

This variable is used directly in the FConcertClientSequencerManager class to check if the feature is enabled and to set its value. The IsUnrelatedSequencerTimelineSyncEnabled() function uses this variable to determine if the feature is active, while SetUnrelatedSequencerTimelineSync() allows for changing the setting programmatically.

The value of CVarEnableUnrelatedTimelineSync is set initially to 0 (disabled) but can be changed at runtime.

Developers should be aware that changing this variable will directly affect the behavior of the Sequencer synchronization feature. They should also note that the value is accessed using GetValueOnAnyThread(), which suggests it might be accessed from multiple threads.

Best practices for using CVarEnableUnrelatedTimelineSync include:

  1. Use the provided FConcertClientSequencerManager methods to check and set the value rather than accessing the CVar directly.
  2. Consider thread safety when changing or reading this value in multi-threaded contexts.
  3. Coordinate changes to this setting with other parts of the system that might rely on Sequencer synchronization behavior.

#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/ConcertClientSequencerManager.cpp:55

Scope: file

Source code excerpt:


// Enable synchronizing the timeline of unrelated Sequencers on remote machine whenever a Sequencer state event is received, if both instances have this option on.
static TAutoConsoleVariable<int32> CVarEnableUnrelatedTimelineSync(TEXT("Concert.EnableUnrelatedTimelineSync"), 0, TEXT("Enable syncing unrelated sequencer timeline."));

// Enable always closing player on remote machine whenever a sequencer is closed on an editor.
static TAutoConsoleVariable<int32> CVarAlwaysCloseGamePlayerOnCloseEvent(
	TEXT("Concert.AlwaysCloseGamePlayerOnCloseEvent"), 1, TEXT("Force this player to close even if other editors have it open. This CVar only works on `-game` instances."));

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientSequencerManager.cpp:55

Scope: file

Source code excerpt:


// Enable synchronizing the timeline of unrelated Sequencers on remote machine whenever a Sequencer state event is received, if both instances have this option on.
static TAutoConsoleVariable<int32> CVarEnableUnrelatedTimelineSync(TEXT("Concert.EnableUnrelatedTimelineSync"), 0, TEXT("Enable syncing unrelated sequencer timeline."));

// Enable always closing player on remote machine whenever a sequencer is closed on an editor.
static TAutoConsoleVariable<int32> CVarAlwaysCloseGamePlayerOnCloseEvent(
	TEXT("Concert.AlwaysCloseGamePlayerOnCloseEvent"), 1, TEXT("Force this player to close even if other editors have it open. This CVar only works on `-game` instances."));

#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientSequencerManager.cpp:334

Scope (from outer to inner):

file
function     bool FConcertClientSequencerManager::IsUnrelatedSequencerTimelineSyncEnabled

Source code excerpt:

bool FConcertClientSequencerManager::IsUnrelatedSequencerTimelineSyncEnabled() const
{
	return CVarEnableUnrelatedTimelineSync.GetValueOnAnyThread() > 0;
}

void FConcertClientSequencerManager::SetUnrelatedSequencerTimelineSync(bool bEnable)
{
	SetConsoleVariableRespectingPriority(CVarEnableUnrelatedTimelineSync->AsVariable(), bEnable);
}

bool FConcertClientSequencerManager::IsSequencerRemoteOpenEnabled() const
{
	return CVarEnableRemoteSequencerOpen.GetValueOnAnyThread() > 0;
}