bMirrorPresenceToEAS

bMirrorPresenceToEAS

#Overview

name: bMirrorPresenceToEAS

The value of this variable can be defined or overridden in .ini config files. 2 .ini config files referencing this setting variable.

It is referenced in 7 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bMirrorPresenceToEAS is to control whether presence information from the default platform should be mirrored to Epic Accounts Service (EAS). This setting is part of the cross-play functionality in Unreal Engine 5.

This setting variable is primarily used by the Online Subsystem EOS plugin, which is responsible for integrating Epic Online Services (EOS) into Unreal Engine games. It’s specifically related to the presence system, which allows players to see the online status and activities of their friends.

The value of this variable is set in the engine configuration file (Engine.ini) and can be modified through the project settings in the Unreal Engine editor. It’s initialized to false by default in the FEOSSettings constructor.

bMirrorPresenceToEAS interacts closely with the bUseEAS variable. When bUseEAS is turned off, bMirrorPresenceToEAS is automatically set to false. Conversely, when bMirrorPresenceToEAS is turned on, bUseEAS is automatically set to true.

Developers must be aware that enabling this feature will cause presence information to be sent to Epic’s servers, which may have privacy implications for users. It’s important to consider data protection regulations and inform users about this data sharing.

Best practices when using this variable include:

  1. Only enable it if cross-platform presence sharing is a required feature for your game.
  2. Ensure that your privacy policy covers the sharing of presence information with Epic Games.
  3. Consider giving users an option to opt-out of presence sharing if it’s not critical to your game’s functionality.
  4. Be mindful of the potential performance impact of mirroring presence data, especially in games with many concurrent players.
  5. Test thoroughly to ensure that presence information is accurately reflected across different platforms when this setting is enabled.

#Setting Variables

#References In INI files

Location: <Workspace>/Projects/Lyra/Config/Custom/EOS/DefaultEngine.ini:30, section: [/Script/OnlineSubsystemEOS.EOSSettings]

Location: <Workspace>/Projects/Lyra/Config/Custom/SteamEOS/DefaultEngine.ini:35, section: [/Script/OnlineSubsystemEOS.EOSSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:143

Scope (from outer to inner):

file
function     FEOSSettings::FEOSSettings

Source code excerpt:

	, bMirrorStatsToEOS(false)
	, bMirrorAchievementsToEOS(false)
	, bMirrorPresenceToEAS(false)
{

}

FEOSSettings UEOSSettings::GetSettings()
{

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:192

Scope (from outer to inner):

file
function     const FEOSSettings& UEOSSettings::ManualGetSettings

Source code excerpt:

		GConfig->GetBool(INI_SECTION, TEXT("bMirrorStatsToEOS"), CachedSettings->bMirrorStatsToEOS, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bMirrorAchievementsToEOS"), CachedSettings->bMirrorAchievementsToEOS, GEngineIni);
		GConfig->GetBool(INI_SECTION, TEXT("bMirrorPresenceToEAS"), CachedSettings->bMirrorPresenceToEAS, GEngineIni);
		// Artifacts explicitly skipped
		GConfig->GetArray(INI_SECTION, TEXT("TitleStorageTags"), CachedSettings->TitleStorageTags, GEngineIni);
		GConfig->GetArray(INI_SECTION, TEXT("AuthScopeFlags"), CachedSettings->AuthScopeFlags, GEngineIni);
	}

	return *CachedSettings;

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:224

Scope (from outer to inner):

file
function     FEOSSettings UEOSSettings::ToNative

Source code excerpt:

	Native.bMirrorStatsToEOS = bMirrorStatsToEOS;
	Native.bMirrorAchievementsToEOS = bMirrorAchievementsToEOS;
	Native.bMirrorPresenceToEAS = bMirrorPresenceToEAS;
	Algo::Transform(Artifacts, Native.Artifacts, &FArtifactSettings::ToNative);
	Native.TitleStorageTags = TitleStorageTags;
	Native.AuthScopeFlags = AuthScopeFlags;

	return Native;
}

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Private/EOSSettings.cpp:411

Scope (from outer to inner):

file
function     void UEOSSettings::PostEditChangeProperty

Source code excerpt:

		if (!bUseEAS)
		{
			bMirrorPresenceToEAS = false;
		}
	}

	// Turning on presence requires EAS
	if (PropertyChangedEvent.Property->GetFName() == FName(TEXT("bMirrorPresenceToEAS")))
	{
		if (bMirrorPresenceToEAS)
		{
			bUseEAS = true;
		}
	}

	// Turning off EAS disables presence mirroring too

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Public/EOSSettings.h:84

Scope: file

Source code excerpt:

	bool bMirrorStatsToEOS;
	bool bMirrorAchievementsToEOS;
	bool bMirrorPresenceToEAS;
	TArray<FEOSArtifactSettings> Artifacts;
	TArray<FString> TitleStorageTags;
	TArray<FString> AuthScopeFlags;
};

UCLASS(Config=Engine, DefaultConfig)

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOS/Public/EOSSettings.h:171

Scope (from outer to inner):

file
class        class UEOSSettings : public URuntimeOptionsBase

Source code excerpt:

	/** Set to true to have Epic Accounts presence information updated when the default platform is updated */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Crossplay Settings")
	bool bMirrorPresenceToEAS = false;

	/**
	 * When running with Steam, defines what TokenType OSSEOS will request from OSSSteam to login with.
	 * Please see EOS documentation at https://dev.epicgames.com/docs/dev-portal/identity-provider-management#steam for more information.
	 * Note the default is currently "Session" but this is deprecated. Please migrate to WebApi.
	 * Possible values:

#Loc: <Workspace>/Engine/Plugins/Online/OnlineSubsystemEOS/Source/OnlineSubsystemEOSPlus/Private/OnlineUserEOSPlus.cpp:1559

Scope (from outer to inner):

file
function     void FOnlineUserEOSPlus::SetPresence
lambda-function

Source code excerpt:

	{
		// Skip setting EAS presence if not mirrored or if we errored at the platform level or the EOS user isn't found
		if (!bWasSuccessful || !NetIdPlus->GetEOSNetId().IsValid() || !UEOSSettings::GetSettings().bMirrorPresenceToEAS)
		{
			IntermediateComplete.ExecuteIfBound(UserId, bWasSuccessful);
			return;
		}
		// Set the EAS version too
		EOSPresenceInterface->SetPresence(*NetIdPlus->GetEOSNetId(), StatusCopy,