There are 2 versions of OSS, one that’s based on
OnlineSubsystem
plugin, and a new plugin that started with UE5 calledOnlineServices
You can’t have OnlineSubsystemEOS
and OnlineServicesEOS
enabled or you will get errors, e.g: Lobby Server Travel fail because FSocketSubsystemEOS::GetLocalUserId
will try to get logged user in Subsystem Auth Interface (and not the user logged in Online Services Auth interface)
Logging
Account
Auth Interface VS Connect Interface
- Auth is for Epic Games accounts
- Connect supports cross play because instead of using EG account ids it will use a Product User ID (PUID)
- More info
Login
Global call stack of a successful call of Login
on the identity interface.
IOnlineIdentity::Login
will callFUserManagerEOS::Login
- will call
CallEOSAuthLogin
(orConnectLoginNoEAS
,LoginViaPersistentAuth
,LoginViaExternalAuth
)- will call
EOS_Auth_Login
, callback atOnEOSAuthLoginComplete
- In callback: (should have Epic Account id (EAID) in
EOS_Auth_LoginCallbackInfo
)- if successful will call
ConnectLoginEAS
that callsEOS_Connect_Login
- In callback: (should have PUID in
EOS_Connect_LoginCallbackInfo
)- if successful:
- calls
FullLoginCallback
(having both EAID and PUID)- calls
AddLocalUser
(with EAID and PUID)- calls
FUniqueNetIdEOSRegistry::FindOrAdd
(with EAID and PUID) - fills data in the local user struct
- calls
UpdateUserInfo
- calls
- will call
TriggerOnLoginCompleteDelegates
as successful
- calls
- calls
- if invalid user:
- calls
CreateConnectedLogin
- calls
- if other error:
- calls
Logout
and logs an Error - will call
TriggerOnLoginCompleteDelegates
as failed
- calls
- if successful:
- In callback: (should have PUID in
- if successful will call
- In callback: (should have Epic Account id (EAID) in
- will call
- will call
User Info
Get DisplayName
About Platform parameter
if not passing platform string getting the display name can work but will provoke the following warnings:
LogEOSPresence: FPresenceClient::GetTargetPlatformTypePrivate - Target User Cache Not Found!
LogEOSRTC: FRTCClient::GetTargetPlatformTypePrivate: Unable to find local user ....
Call stack when getting user display name
IOnlineUserPtr::GetUserInfo
returnsFOnlineUser
- call
FOnlineUser::GetDisplayName
- implementation in
TOnlineUserEOS::GetDisplayName
- calls
OnlineSubsystemEOSTypesPrivate::GetBestDisplayName
- calls
UserManager->GetBestDisplayName
(FUserManagerEOS
)- calls
GetBestDisplayNameStr
andEOS_UserInfo_BestDisplayName_Release
- calls
- calls
- calls
- implementation in
- call
Lobby
- Schemas
- Schema flags list:
ESchemaAttributeFlags
Searchable attributes
Searchable attributes must be declared in the LobbyBase schema id or the following error will come on Engine init config:
Invalid schema attribute yourderivedschemaid.lobby.yoursearchableattribute: Searchable fields may only exist in the base schema.
Known issues
Unable to map None to EOS_OnlinePlatformType
FEpicGamesPlatform::GetOnlinePlatformType - unable to map None to EOS_OnlinePlatformType
: Explanation
Overlay initialization failed
EOS First overlay initialization failed for swapchain. Disabling any future attempts to initialize.
This can be because we don’t use OnlineSubsystemEOS
but OnlineServicesEOS
, which cause EOS_Platform_Create
inside FEOSSDKManager::CreatePlatform
to be called to late (after graphics initialized).
Fix:
- Make a custom module
- Add it to your project target file
- Add it to your
.uproject
module dependency list withPostSplashScreen
LoadingPhase