Concert.EnableSequencePlayer

Concert.EnableSequencePlayer

#Overview

name: Concert.EnableSequencePlayer

This variable is created as a Console Variable (cvar).

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Concert.EnableSequencePlayer is to enable Concert Sequence Players on game clients in Unreal Engine 5. This setting is primarily used for the Concert system, which is a part of Unreal Engine’s collaborative tools.

This setting variable is relied upon by the ConcertSyncClient module, specifically within the ConcertClientSequencerManager. It’s part of the Concert plugin, which is designed for real-time collaboration in Unreal Engine.

The value of this variable is set as a console variable with a default value of 1 (enabled). It can be changed at runtime through the console or configuration files.

The associated variable CVarEnableSequencePlayer directly interacts with Concert.EnableSequencePlayer. They share the same value and purpose.

Developers must be aware that this variable only affects game clients, not the editor. It’s checked in various functions within the ConcertClientSequencerManager to determine whether certain actions should be taken, such as creating new sequence players, applying time adjustments, or handling transport events.

Best practices when using this variable include:

  1. Ensure it’s enabled when you want to synchronize sequence playback across game clients in a collaborative session.
  2. Be aware that disabling it may prevent game clients from properly participating in synchronized sequence playback.
  3. Consider the performance implications of enabling this feature, especially in large multiplayer scenarios.

Regarding the associated variable CVarEnableSequencePlayer:

The purpose of CVarEnableSequencePlayer is identical to Concert.EnableSequencePlayer. It’s an internal representation of the console variable within the C++ code.

This variable is used directly in the ConcertClientSequencerManager to control the behavior of sequence players in game clients.

The value of CVarEnableSequencePlayer is set when the Concert.EnableSequencePlayer console variable is initialized.

It interacts closely with other variables in the same context, such as CVarEnableLoopingOnPlayer and CVarEnableRemoteSequencerOpen, which control related aspects of the Concert sequencer system.

Developers should be aware that this variable is checked using the GetValueOnAnyThread() method, which suggests it can be accessed from multiple threads. This implies that changes to this variable can affect the behavior of the system immediately, even in ongoing operations.

Best practices for CVarEnableSequencePlayer include:

  1. Use it consistently with Concert.EnableSequencePlayer, as they represent the same setting.
  2. Be cautious when changing its value during runtime, as it may affect ongoing sequence playback operations.
  3. Consider the threading implications when accessing or modifying this variable in custom code.

#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:44

Scope: file

Source code excerpt:


// Enable Sequence Playing on game client
static TAutoConsoleVariable<int32> CVarEnableSequencePlayer(TEXT("Concert.EnableSequencePlayer"), 1, TEXT("Enable Concert Sequence Players on `-game` client."));

static TAutoConsoleVariable<int32> CVarEnableLoopingOnPlayer(TEXT("Concert.EnableLoopingOnPlayer"), 1, TEXT("Enable Looping Sequence Players when sequencer looping is enabled."));

// Enable opening Sequencer on remote machine whenever a Sequencer is opened, if both instances have this option on.
static TAutoConsoleVariable<int32> CVarEnableRemoteSequencerOpen(TEXT("Concert.EnableOpenRemoteSequencer"), 1, TEXT("Enable Concert remote Sequencer opening."));

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:


// Enable Sequence Playing on game client
static TAutoConsoleVariable<int32> CVarEnableSequencePlayer(TEXT("Concert.EnableSequencePlayer"), 1, TEXT("Enable Concert Sequence Players on `-game` client."));

static TAutoConsoleVariable<int32> CVarEnableLoopingOnPlayer(TEXT("Concert.EnableLoopingOnPlayer"), 1, TEXT("Enable Looping Sequence Players when sequencer looping is enabled."));

// Enable opening Sequencer on remote machine whenever a Sequencer is opened, if both instances have this option on.
static TAutoConsoleVariable<int32> CVarEnableRemoteSequencerOpen(TEXT("Concert.EnableOpenRemoteSequencer"), 1, TEXT("Enable Concert remote Sequencer opening."));

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

Scope (from outer to inner):

file
function     void FConcertClientSequencerManager::ApplyOpenEvent

Source code excerpt:


#endif
	if (!GIsEditor && CVarEnableSequencePlayer.GetValueOnAnyThread() > 0)
	{
		CreateNewSequencePlayerIfNotExists(*SequenceObjectPath);
		bDidOpen = true;
	}

	if (bDidOpen && UE::Private::ConcertClientSequencerManager::IsPendingTakePath(SequenceObjectPath))

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

Scope (from outer to inner):

file
function     void FConcertClientSequencerManager::ApplyTimeAdjustmentEvent

Source code excerpt:

		ApplyTimeAdjustmentToSequencers(TimeAdjustmentEvent);
	}
	else if (CVarEnableSequencePlayer.GetValueOnAnyThread() > 0)
	{
		ApplyTimeAdjustmentToPlayers(TimeAdjustmentEvent);
	}
}

bool ApplyStartFrameToMovieScene(FFrameNumber StartFrame, UMovieScene* MovieScene)

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

Scope (from outer to inner):

file
function     void FConcertClientSequencerManager::ApplyTransportEvent

Source code excerpt:

		ApplyEventToSequencers(SequencerState);
	}
	else if (CVarEnableSequencePlayer.GetValueOnAnyThread() > 0)
	{
		ApplyEventToPlayers(SequencerState);
	}
}

void FConcertClientSequencerManager::ApplyEventToSequencers(const FConcertSequencerState& EventState)