question

Greggory Addison avatar image
Greggory Addison asked

Failing to create a lobby/session with Unreal OnlineSubsystemPlayFab Plugin

Now I've tried this 2 different ways. The first was with the IOnlineSessionPtr using "CreateSession" heres the code

FOnlineSessionSettings SessionSettings;
SessionSettings.bAllowInvites = true;
SessionSettings.bShouldAdvertise = true;
SessionSettings.bUsesPresence = true;
SessionSettings.bAllowJoinInProgress = true;
SessionSettings.NumPublicConnections = 3;
SessionSettings.NumPrivateConnections = 0;
SessionSettings.bAllowJoinViaPresenceFriendsOnly = true;

SessionInterface->CreateSession(0, "PlayFabSession", SessionSettings);

This didn't create a session and it was due to the code failing at a point where the playfab plugin is checking if the ISocketSubsystem is valid which in my case it was NULL. Not sure how to troubleshoot that I tried another way and this was getting the FPlayFabLobbyPtr and calling "CreateLobbyWithUser" Heres the code

if (LobbyConfiguration->CreateLobbyWithUser(MakeShared<FPlayFabUser>(FPlayFabUser(Result.PlayFabId, Result.EntityToken->EntityToken, Result.EntityToken->Entity->Id, Result.EntityToken->Entity->Type, "TestSession", nullptr)), "TestSession", SessionSettings))
{
   UE_LOG(LogPlayFabSessionsSubsystem, Warning, TEXT("Successfully Created Lobby"));
}
else
{
   UE_LOG(LogPlayFabSessionsSubsystem, Warning, TEXT("Failed to Create Lobby"));
}

Now this actually returned true but I hit a hard crash due to an Exception in the FPlayFabLobby::HandleCreateAndJoinLobbyCompleted Delegate. According to the error the "ExistingNamedSession" was NULL. This caused my game to crash.

Has anyone worked with this and can help me out with the correct way to create lobbies so I can invite friends.

apissdksunrealmultiplayerMatchmaking
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Rick Chen avatar image Rick Chen ♦ commented ·

Due to limited resources, it is hard for us to do the Unreal test for you. I see that you have been discussing the issue on our discord channel. I hope you can get some help there.

0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.