Concert.EmitPresence

Concert.EmitPresence

#Overview

name: Concert.EmitPresence

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.EmitPresence is to control whether Concert Presence updates are sent to remote users in Unreal Engine’s Concert system. This setting is part of the collaboration and synchronization features provided by the Concert system.

The Concert.EmitPresence variable is primarily used in the ConcertSyncClient module, which is part of the Concert plugin for Unreal Engine. This plugin facilitates real-time collaboration and synchronization between multiple users working on the same project.

The value of this variable is set using a console variable (CVar) system. It’s initialized with a default value of 1, which means it’s enabled by default. Developers can change this value at runtime using console commands or through configuration files.

The associated variable CVarEmitPresence interacts directly with Concert.EmitPresence. They share the same value and purpose.

Developers should be aware that:

  1. This variable affects the performance and network usage of the Concert system. Disabling it might reduce network traffic but will prevent other users from seeing updates to your presence.
  2. It’s specifically used for non-game clients, as indicated by the check !IsInGame() in the code.
  3. The frequency of presence updates is controlled by ConcertClientPresenceManagerUtil::LocationUpdateFrequencySeconds.

Best practices when using this variable include:

  1. Keep it enabled (default value of 1) when collaboration features are needed.
  2. Consider disabling it in scenarios where presence updates are not necessary or to reduce network traffic.
  3. Be aware of its interaction with other Concert settings, such as Concert.DisplayPresence.

Regarding the associated variable CVarEmitPresence:

#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/ConcertClientPresenceManager.cpp:60

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarDisplayPresence(TEXT("Concert.DisplayPresence"), 1, TEXT("Enable display of Concert Presence from remote users."));
static TAutoConsoleVariable<int32> CVarEmitPresence(TEXT("Concert.EmitPresence"), 1, TEXT("Enable display update of Concert Presence to remote users."));

const TCHAR* FConcertClientPresenceManager::AssetContainerPath = TEXT("/ConcertSyncClient/ConcertAssets");

FConcertClientPresenceStateEntry::FConcertClientPresenceStateEntry(TSharedRef<FConcertClientPresenceEventBase> InPresenceEvent)
	: PresenceEvent(MoveTemp(InPresenceEvent))
	, bSyncPending(true)

#Associated Variable and Callsites

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

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

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarDisplayPresence(TEXT("Concert.DisplayPresence"), 1, TEXT("Enable display of Concert Presence from remote users."));
static TAutoConsoleVariable<int32> CVarEmitPresence(TEXT("Concert.EmitPresence"), 1, TEXT("Enable display update of Concert Presence to remote users."));

const TCHAR* FConcertClientPresenceManager::AssetContainerPath = TEXT("/ConcertSyncClient/ConcertAssets");

FConcertClientPresenceStateEntry::FConcertClientPresenceStateEntry(TSharedRef<FConcertClientPresenceEventBase> InPresenceEvent)
	: PresenceEvent(MoveTemp(InPresenceEvent))
	, bSyncPending(true)

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

Scope (from outer to inner):

file
function     void FConcertClientPresenceManager::OnEndFrame

Source code excerpt:


	// Game client do not generate a presence mode and state.
	if (SecondsSinceLastLocationUpdate >= ConcertClientPresenceManagerUtil::LocationUpdateFrequencySeconds && !IsInGame() && CVarEmitPresence.GetValueOnAnyThread() > 0)
	{
		// if the factory indicate the mode should be reset for recreation.
		if (PresenceModeFactory->ShouldResetPresenceMode())
		{
			CurrentAvatarMode.Reset();
		}