Hello, I’m trying to join a session I just created, the simplified function where it blocks, simplified for lisibility :
void UW_Menu::OnFindSessions(const TArray<FOnlineSessionSearchResult>& SessionResults, bool bWasSuccessful)
{
if(bWasSuccessful && SessionResults.Num() > 0)
{
FString SessionFound_MatchType;
AddOnScreenDebugMessage(MatchType);
for(auto Result : SessionResults)
{
Result.Session.SessionSettings.Get(FName("MatchType"), SessionFound_MatchType);
AddOnScreenDebugMessage(SessionFound_MatchType);
if (SessionFound_MatchType == MatchType)
{
MultiplayerSessionsSubsystem->JoinSession(Result);
return;
}
}
AddOnScreenDebugMessage("No match type corresponding");
}
}
I always reach “No match type corresponding” and indeed, sessions I found have no match type.
I tried in local and remote networks.
All importants settings have been done.
LastSessionSettings = MakeShareable(new FOnlineSessionSettings());
LastSessionSettings->bIsLANMatch = null;
LastSessionSettings->NumPublicConnections = _NumPublicConnections;
LastSessionSettings->bAllowJoinInProgress = true;
LastSessionSettings->bAllowJoinViaPresence = true;
LastSessionSettings->bShouldAdvertise = true;
LastSessionSettings->bUsesPresence = true;
LastSessionSettings->bUseLobbiesIfAvailable = true;
LastSessionSettings->Set(FName("MatchType"), _MatchType, EOnlineDataAdvertisementType::ViaOnlineServiceAndPing);
LastSessionSettings->BuildUniqueId = 1;
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bInitServerOnClient=true
Any idea ?
Also I don’t know why it finds so many sessions. These sessions seems to belong to the game Chained Together, I can even see their passwords ?!!