Currently working on adding a cross-platform friends list to my game. I have encountered the following:
-
I’ve followed a couple of tutorials, and I can log in using the account portal or the dev auth tool.
-
Once I enabled EOSPlus, the EOS overlay stopped working, and only the steam overlay only works.
-
I also receive an error message when trying to pull the user’s friends list.
LogTemp: Warning: ReadFriendsList, success?: false, Error List of ids to query is empty for User (....|....), so can't query external account ids
See files below,
DefaultEngine.Ini
[/Script/OnlineSubsystemEOS.EOSSettings]
CacheDir=CacheDir
DefaultArtifactName=Main
TickBudgetInMilliseconds=0
bEnableOverlay=True
bEnableSocialOverlay=True
bShouldEnforceBeingLaunchedByEGS=False
TitleStorageReadChunkLength=0
+Artifacts= << REDACTED >>
bUseEAS=True
bUseEOSConnect=True
bMirrorStatsToEOS=True
bMirrorAchievementsToEOS=True
bUseEOSSessions=True
bMirrorPresenceToEAS=True
[OnlineSubsystemEOS]
bEnabled=true
[OnlineSubsystem]
DefaultPlatformService=EOSPlus
NativePlatformService=Steam
[OnlineSubsystemEOSPlus]
bEnabled=true
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
[/Script/Engine.GameEngine]
NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[/Script/SocketSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true
[/Script/OnlineSubsystemUtils.OnlineEngineInterfaceImpl]
CompatibleUniqueNetIdTypes=EOS
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
GameInstance.h
UFUNCTION(BlueprintCallable)
void GetAllFriends();
void OnGetFriendsList(int32 LocalUserNum, bool bWasSuccessful, const FString& ListName, const FString& ErrorStr);
GameInstance.cpp
void UProject24GameInstance::GetAllFriends(){
if(bIsLoggedIn){
if(OnlineSubsystem){
if(IOnlineFriendsPtr Friends = OnlineSubsystem->GetFriendsInterface()){
Friends->ReadFriendsList(0, EFriendsLists::ToString(EFriendsLists::Default), FOnReadFriendsListComplete::CreateUObject(this,&UProject24GameInstance::OnGetFriendsList));
}
}
}
return;
}
void UProject24GameInstance::OnGetFriendsList(int32 LocalUserNum, bool bWasSuccessful, const FString& ListName,
const FString& ErrorStr){
UE_LOG(LogTemp, Warning, TEXT("ReadFriendsList, success?: %s, Error %s"), bWasSuccessful ? TEXT("true") : TEXT("false"), *ErrorStr);
if(bWasSuccessful){
if(OnlineSubsystem){
if(IOnlineFriendsPtr Friends = OnlineSubsystem->GetFriendsInterface()){
TArray<TSharedRef<FOnlineFriend>> CurrentFriends;
if(Friends->GetFriendsList(0,ListName,CurrentFriends)){
for(TSharedRef<FOnlineFriend> Friend : CurrentFriends){
auto Name = Friend.Get().GetDisplayName();
UE_LOG(LogTemp, Warning, TEXT("Friend: , %s"), *Name);
}
}
else{
UE_LOG(LogTemp, Warning, TEXT("GetFriendsList, failure!"));
}
}
}
}
return;
}
Any help or pointers would be helpful.