There are 2 versions of OSS, one that’s based on
OnlineSubsystemplugin, and a new plugin that started with UE5 calledOnlineServices(working with EGS plugin to)
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)
Resources
- Starting with OSSv1 Forum Thread - Course from a UE EOS dev.
- EOS Online Framework Plugin
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::Loginwill 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
ConnectLoginEASthat 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
TriggerOnLoginCompleteDelegatesas successful
- calls
- calls
- if invalid user:
- calls
CreateConnectedLogin
- calls
- if other error:
- calls
Logoutand logs an Error - will call
TriggerOnLoginCompleteDelegatesas 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::GetUserInforeturnsFOnlineUser- call
FOnlineUser::GetDisplayName- implementation in
TOnlineUserEOS::GetDisplayName- calls
OnlineSubsystemEOSTypesPrivate::GetBestDisplayName- calls
UserManager->GetBestDisplayName(FUserManagerEOS)- calls
GetBestDisplayNameStrandEOS_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
OnlineSubsystemEOSbutOnlineServicesEOS, which causeEOS_Platform_CreateinsideFEOSSDKManager::CreatePlatformto be called to late (after graphics initialized).Fix:
- Make a new
Runtimemodule with the loading phase set toPostSplashScreen- Add this module to your project target file (and also project editor target)
- Add the module to your
.uprojectmodule dependency list (withRuntimeandPostSplashScreen)- In your module
Build.csinclude as a dependency (for example inPrivateDependencyModuleNames) theOnlineServicesInterfacemodule.- Inside your module
StartupModule, callUE::Online::GetServices(...), in my case I was callingUE::Online::GetServices(UE::Online::EOnlineServices::Epic). This will trigger the EOS Overlay to be created, andPostSplashScreenis early enough for it.