bMirrorAchievementsToEOS

bMirrorAchievementsToEOS

#Overview

name: bMirrorAchievementsToEOS

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 8 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bMirrorAchievementsToEOS is to control whether achievement data should be mirrored (copied) to the Epic Online Services (EOS) platform in addition to the default platform. This setting is used for cross-platform achievement synchronization in games that utilize multiple online subsystems.

This setting variable is primarily used by the Online Subsystem EOS plugin, which is part of Unreal Engine’s online services framework. It’s specifically related to the achievement system within this subsystem.

The value of this variable is set in the engine’s configuration files (typically in DefaultEngine.ini) and can be modified through the Unreal Engine editor in the project settings under the “Plugins > Online Subsystem EOS” category.

This variable interacts closely with other EOS-related settings, particularly:

  1. bUseEOSConnect: bMirrorAchievementsToEOS requires this to be true to function.
  2. bMirrorStatsToEOS: Similar setting for stats mirroring.
  3. bUseEOSSessions: Another EOS-related setting for session management.

Developers must be aware that:

  1. This setting only takes effect if EOS Connect is enabled (bUseEOSConnect is true).
  2. Enabling this will cause achievement data to be written to both the default platform and EOS, which may have performance implications.
  3. This is part of a larger cross-platform strategy and should be considered in conjunction with other EOS settings.

Best practices when using this variable include:

  1. Ensure that EOS Connect is properly set up and configured before enabling this setting.
  2. Test thoroughly to ensure achievements are correctly mirrored across platforms.
  3. Consider the potential impact on performance and network usage, especially for games with frequent achievement updates.
  4. Use this in conjunction with other EOS mirroring settings for a consistent cross-platform experience.
  5. Be aware of any platform-specific requirements or limitations regarding achievement data.

#Setting Variables

#References In INI files

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

Location: <Workspace>/Projects/Lyra/Config/Custom/SteamEOS/DefaultEngine.ini:33, 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:142

Scope (from outer to inner):

file
function     FEOSSettings::FEOSSettings

Source code excerpt:

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

}

FEOSSettings UEOSSettings::GetSettings()

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

Scope (from outer to inner):

file
function     const FEOSSettings& UEOSSettings::ManualGetSettings

Source code excerpt:

		GConfig->GetBool(INI_SECTION, TEXT("bUseEOSSessions"), CachedSettings->bUseEOSSessions, GEngineIni);
		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);
	}

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

Scope (from outer to inner):

file
function     FEOSSettings UEOSSettings::ToNative

Source code excerpt:

	Native.bUseEOSSessions = bUseEOSSessions;
	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:429

Scope (from outer to inner):

file
function     void UEOSSettings::PostEditChangeProperty

Source code excerpt:

		if (!bUseEOSConnect)
		{
			bMirrorAchievementsToEOS = false;
			bMirrorStatsToEOS = false;
			bUseEOSSessions = false;
		}
	}

	// These all require EOS turned on if they are on

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

Scope (from outer to inner):

file
function     void UEOSSettings::PostEditChangeProperty

Source code excerpt:

		PropertyChangedEvent.Property->GetFName() == FName(TEXT("bUseEOSSessions")))
	{
		if (bMirrorAchievementsToEOS || bMirrorStatsToEOS || bUseEOSSessions)
		{
			bUseEOSConnect = true;
		}
	}

	Super::PostEditChangeProperty(PropertyChangedEvent);

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

Scope: file

Source code excerpt:

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

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

Scope (from outer to inner):

file
class        class UEOSSettings : public URuntimeOptionsBase

Source code excerpt:

	/** Set to true to write achievement data to EOS as well as the default platform */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Crossplay Settings")
	bool bMirrorAchievementsToEOS = false;

	/** Set to true to use EOS for session registration with data mirrored to the default platform */
	UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Crossplay Settings", DisplayName="Use Crossplay Sessions")
	bool bUseEOSSessions = false;

	/** Set to true to have Epic Accounts presence information updated when the default platform is updated */

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

Scope (from outer to inner):

file
function     void FOnlineAchievementsEOSPlus::WriteAchievements

Source code excerpt:

		BaseAchievementsInterface->WriteAchievements(*NetIdPlus->GetBaseNetId(), WriteObject, Delegate);
	}
	if (UEOSSettings::GetSettings().bMirrorAchievementsToEOS)
	{
		if (NetIdPlus->GetEOSNetId().IsValid())
		{
			// Mirror the achievement data to EOS
			EosAchievementsInterface->WriteAchievements(*NetIdPlus->GetEOSNetId(), WriteObject, Ignored);
		}