I am currently developing a lobby feature using OnlineSubsystemEOS in 5.4.4/5.5.4.
However, I have encountered an issue where the member information within the lobby is not updated correctly.
Specifically, FOnlineSession::SessionSettings.MemberSettings is not being properly refreshed.
I would like to ask:
If I am using OnlineSubsystemEOS incorrectly, or if there is a necessary modification to the Engine Source, could you provide guidance on how to address this?
Here are the steps I have followed:
- Create a lobby using FOnlineSessionEOS::CreateSession with bUseLobbiesIfAvailable == true.
- After creating the lobby, send an invitation to a friend (the invitation is successfully received by the friend).
- The invited friend joins the lobby via JoinSession (and the JoinSession call also succeeds).
- Both the host and the guest monitor FOnlineSession::SessionSettings.MemberSettings to retrieve member information.
At Step #4, I expect to be able to retrieve each member’s UniqueNetId and DisplayName from MemberSettings.
While debugging the Engine Source, I confirmed that FOnlineSessionEOS::OnLobbyUpdateReceived is called on the host side.
It appears that FOnlineSessionEOS::CopyLobbyData is responsible for updating FOnlineSession::SessionSettings.MemberSettings.
However, FOnlineSessionEOS::GetDefaultLocalUserForLobby seems to access MemberSettings beforehand, and since MemberSettings is still empty when OnLobbyUpdateReceived is called, it leads to a contradiction where MemberSettings cannot be updated properly.
In particular, in
Engine\Plugins\Online\OnlineSubsystemEOS\Source\OnlineSubsystemEOS\Private\OnlineSessionEOS.cpp
within the FOnlineSessionEOS::OnLobbyUpdateReceived function, the following line appears problematic:
const EOS_ProductUserId LocalUserId = EOSSubsystem->UserManager->GetLocalProductUserId(GetDefaultLocalUserForLobby(*LobbyNetId));
Because of this, EOS_Lobby_CopyLobbyDetailsHandle sometimes fails.
If there is a correct or recommended way to properly update FOnlineSession::SessionSettings.MemberSettings, I would appreciate your advice or any related information.