Concert.EnableLoopingOnPlayer
Concert.EnableLoopingOnPlayer
#Overview
name: Concert.EnableLoopingOnPlayer
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable Looping Sequence Players when sequencer looping is enabled.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Concert.EnableLoopingOnPlayer is to control whether looping is enabled for Sequence Players in the Concert system when sequencer looping is enabled. This setting is part of the Concert Sync Client module, which is responsible for synchronizing sequencer playback across multiple clients in a networked environment.
This setting variable is primarily used by the Concert Sync Client module, which is part of the Concert plugin in Unreal Engine 5. The Concert system is designed for real-time collaboration in Unreal Engine projects.
The value of this variable is set as a console variable (CVar) with a default value of 1 (enabled). It can be changed at runtime through the console or configuration files.
The associated variable CVarEnableLoopingOnPlayer interacts directly with this setting. It’s used to retrieve the current value of the setting in the code.
Developers should be aware that this setting affects the behavior of Sequence Players in a networked environment. When enabled (value > 0), it allows for indefinite looping of sequences when sequencer looping is enabled.
Best practices when using this variable include:
- Consider the implications of enabling or disabling looping in a networked environment.
- Ensure all clients have consistent settings to avoid desynchronization.
- Use this in conjunction with other Concert settings for a cohesive collaboration experience.
Regarding the associated variable CVarEnableLoopingOnPlayer:
The purpose of CVarEnableLoopingOnPlayer is to provide programmatic access to the Concert.EnableLoopingOnPlayer setting within the C++ code.
This variable is used directly in the ConcertClientSequencerManager module to determine whether to enable indefinite looping for Sequence Players.
The value of this variable is set automatically based on the Concert.EnableLoopingOnPlayer console variable.
It interacts with the GetPlaybackSettings function, where it’s used to decide whether to set the LoopCount to -1 (indefinite looping) or not.
Developers should be aware that this variable’s value is retrieved using the GetValueOnAnyThread() method, which means it can be accessed from any thread safely.
Best practices when using this variable include:
- Use GetValueOnAnyThread() for thread-safe access to the value.
- Consider caching the value if it’s accessed frequently in performance-critical sections.
- Be aware that changes to this value at runtime will affect the behavior of Sequence Players in the Concert system.
#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:46
Scope: file
Source code excerpt:
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."));
// Enable closing Sequencer for this user when a remote user closes the sequence.
static TAutoConsoleVariable<int32> CVarEnableRemoteSequencerClose(TEXT("Concert.EnableCloseRemoteSequencer"), 0, TEXT("Enable Concert remote Sequencer closing."));
#Associated Variable and Callsites
This variable is associated with another variable named CVarEnableLoopingOnPlayer
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientSequencerManager.cpp:46
Scope: file
Source code excerpt:
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."));
// Enable closing Sequencer for this user when a remote user closes the sequence.
static TAutoConsoleVariable<int32> CVarEnableRemoteSequencerClose(TEXT("Concert.EnableCloseRemoteSequencer"), 0, TEXT("Enable Concert remote Sequencer closing."));
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientSequencerManager.cpp:446
Scope (from outer to inner):
file
namespace UE::Private::ConcertClientSequencerManager
function FMovieSceneSequencePlaybackSettings GetPlaybackSettings
Source code excerpt:
PlaybackSettings.bPauseAtEnd = true;
if (bInLoopMode && CVarEnableLoopingOnPlayer.GetValueOnAnyThread() > 0)
{
// Loop indefinitely
PlaybackSettings.LoopCount.Value = -1;
}
return PlaybackSettings;
}