We have a game supporting Steam and EGS where we want cross-store leaderboards shown in game. We were seeing that Steam users were not showing up in the in-game leaderboards, despite seeing them in the dev portal and in the sample leaderboard app. We discovered that this bit of code in FOnlineLeaderboardsEOS::ReadLeaderboardsAroundRank is the culprit:
EOS_Connect_GetProductUserIdMappingOptions Options = { };
Options.ApiVersion = 1;
UE_EOS_CHECK_API_MISMATCH(EOS_CONNECT_GETPRODUCTUSERIDMAPPING_API_LATEST, 1);
Options.AccountIdType = EOS_EExternalAccountType::EOS_EAT_EPIC;
Options.LocalUserId = EOSSubsystem->UserManager->GetLocalProductUserId(0);
// Allow for us reading a page out of the whole stats range returned
for (uint32 Index = StartIndex; Index <= NewEndIndex; Index++)
{
CopyOptions.LeaderboardRecordIndex = Index;
EOS_Leaderboards_LeaderboardRecord* Record = nullptr;
EOS_EResult Result = EOS_Leaderboards_CopyLeaderboardRecordByIndex(EOSSubsystem->LeaderboardsHandle, &CopyOptions, &Record);
if (Result == EOS_EResult::EOS_Success)
{
char EpicIdStr[EOS_CONNECT_EXTERNAL_ACCOUNT_ID_MAX_LENGTH+1];
int32 EpicIdStrSize = sizeof(EpicIdStr);
Options.TargetProductUserId = Record->UserId;
Result = EOS_Connect_GetProductUserIdMapping(EOSSubsystem->ConnectHandle, &Options, EpicIdStr, &EpicIdStrSize);
if (Result == EOS_EResult::EOS_Success)
{
...
This makes it impossible for us to do what we want without implementing our own version of the Online Subsystem or modifying the engine code.