SocialPlatformDescriptions
SocialPlatformDescriptions
#Overview
name: SocialPlatformDescriptions
The value of this variable can be defined or overridden in .ini config files. 9
.ini config files referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of SocialPlatformDescriptions is to define and store descriptions of various social platforms supported by the Unreal Engine’s online framework. This variable is used to manage platform-specific information within the social and party systems of the engine.
The SocialPlatformDescriptions variable is primarily used by the Online Framework plugin, specifically within the Party module. This can be seen from the file paths in the callsites, which are all located in the OnlineFramework/Source/Party directory.
The value of this variable is set in the configuration files, as indicated by the UPROPERTY(Config) decorator in the USocialSettings class definition.
SocialPlatformDescriptions interacts with other parts of the social system, such as the FUserPlatform struct, which uses this variable to initialize platform-specific information for users.
Developers should be aware that this variable is crucial for proper platform identification and handling within the social and party systems. It’s important to ensure that all supported platforms are correctly described in this array.
Best practices when using this variable include:
- Keeping the platform descriptions up-to-date with any changes in supported platforms or their characteristics.
- Ensuring that the configuration files properly populate this array with accurate information.
- Using the provided accessor methods (like GetSocialPlatformDescriptions()) instead of accessing the variable directly, to maintain encapsulation and allow for potential future changes in implementation.
- When adding support for new platforms, make sure to add corresponding entries to this array and update any related logic that depends on platform-specific behavior.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:53, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
ClearArray
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:54, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="AND", PlatformType="MOBILE", CrossplayPool="MOBILE")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:55, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="IOS", PlatformType="MOBILE", CrossplayPool="MOBILE")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:56, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="LNX", PlatformType="DESKTOP", CrossplayPool="DESKTOP")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:57, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="MAC", PlatformType="DESKTOP", CrossplayPool="DESKTOP")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:58, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="WIN", PlatformType="DESKTOP", CrossplayPool="DESKTOP")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:59, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="PSN", PlatformType="CONSOLE", OnlineSubsystem="PS4", ExternalAccountType="psn", SessionType="PS4", CrossplayPool="psn")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:60, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="SWT", PlatformType="CONSOLE", OnlineSubsystem="SWITCH", ExternalAccountType="nintendo", CrossplayPool="nintendo")
- Is Array:
True
Location: <Workspace>/Engine/Config/BaseGame.ini:61, section: [/Script/Party.SocialSettings]
- INI Section:
/Script/Party.SocialSettings
- Raw value:
(Name="XBL", PlatformType="CONSOLE", OnlineSubsystem="LIVE", ExternalAccountType="xbl", SessionType="MPSD", CrossplayPool="xbl")
- Is Array:
True
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Online/OnlineFramework/Source/Party/Private/SocialSettings.cpp:99
Scope (from outer to inner):
file
function const TArray<FSocialPlatformDescription>& USocialSettings::GetSocialPlatformDescriptions
Source code excerpt:
{
const USocialSettings& SettingsCDO = *GetDefault<USocialSettings>();
return SettingsCDO.SocialPlatformDescriptions;
}
const FSocialPlatformDescription* USocialSettings::GetSocialPlatformDescriptionForOnlineSubsystem(const FName& OnlineSubsystemName)
{
return GetSocialPlatformDescriptions().FindByPredicate([&OnlineSubsystemName](const FSocialPlatformDescription& Candidate)
{
#Loc: <Workspace>/Engine/Plugins/Online/OnlineFramework/Source/Party/Private/SocialTypes.cpp:21
Scope (from outer to inner):
file
function FUserPlatform::FUserPlatform
Source code excerpt:
FUserPlatform::FUserPlatform(const FString& InPlatform)
{
const TArray<FSocialPlatformDescription>& SocialPlatformDescriptions = USocialSettings::GetSocialPlatformDescriptions();
for (const FSocialPlatformDescription& Entry : SocialPlatformDescriptions)
{
if (Entry.Name == InPlatform)
{
PlatformDescription = Entry;
break;
}
#Loc: <Workspace>/Engine/Plugins/Online/OnlineFramework/Source/Party/Public/SocialSettings.h:118
Scope (from outer to inner):
file
class class USocialSettings : public UObject
Source code excerpt:
UPROPERTY(Config)
TArray<FSocialPlatformDescription> SocialPlatformDescriptions;
UPROPERTY(Config)
TArray<FName> SonyOSSNames;
};