Hi Folks,
I’m facing a multiplayer issue I hope you can help me with.
In short:
I’m running the game with these multiplayer options:
- Number Of Players: 2
- Run Dedicated Server: false
The project is set to use OnlineSubsystemNull.
On the first player, I create a Session with name MySession with these configurations
SessionSettings->bIsLANMatch = true;
SessionSettings->bUsesPresence = true;
SessionSettings->NumPublicConnections = 8;
SessionSettings->NumPrivateConnections = 0;
SessionSettings->bAllowInvites = true;
SessionSettings->bAllowJoinInProgress = true;
SessionSettings->bShouldAdvertise = true;
SessionSettings->bAllowJoinViaPresence = true;
SessionSettings->bAllowJoinViaPresenceFriendsOnly = false;
On the second player, I join the same session but, obviously, without creating it again.
The session is correctly created for the first player, but the problem is that when I try to join the same Session with the second player, I keep getting this error and I’m not able to join:
LogOnline:Warning: NULL: Session (MySession) already exists, can't join twice
Without posting any big code here, I assure you that the code for creating the session is not being called on the second player.
I suspect the issue is caused by calling the Create and Join Session passing the same UniqueNetId using
GetFirstGamePlayer()->GetPreferredUniqueNetId()
but if that’s the case, how can I test my application on the same machine using two different players?
Many thanks in advance for any feedback guys.