SEARCH_PRESENCE deprecated

Since SEARCH_PRESENCE is deprecated in ue 5.5 it is no lonjger possible to join steam games.
How should my code be changed? Also says presence and lobbies have to be same value. But if I set lobbies to false, the games are not even searchable. Any ideas what todo?

FOnlineSessionSettings SessionSettings;

SessionSettings.bIsDedicated			= false;
SessionSettings.bIsLANMatch				= IsLan;
SessionSettings.bShouldAdvertise		= !InviteOnly;
SessionSettings.bUsesPresence			= true;
SessionSettings.NumPublicConnections	= 8;

SessionSettings.bAllowInvites						= true;
SessionSettings.bAllowJoinViaPresence				= true;
SessionSettings.bAllowJoinInProgress				= false;
SessionSettings.bUseLobbiesIfAvailable				= true;
SessionSettings.bUseLobbiesVoiceChatIfAvailable		= true;
SessionSearch->QuerySettings.Set(SEARCH_LOBBIES, true, EOnlineComparisonOp::Equals);
SessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

Getting EOnJoinSessionCompleteResult::Type::UnknownError on join session complete handler.

STEAM: [FOnlineSessionSteam::JoinSession] The values of FOnlineSessionSettings::bUsesPresence and FOnlineSessionSettings::bUseLobbiesIfAvailable are treated as equal and have to match
and this in console

yeah ok so I cant set search presence in search anymore, but joining session still requires it. so modifying the search result setting before joining fixes it:
SearchResults[ID].Session.SessionSettings.bUsesPresence = true;
SearchResults[ID].Session.SessionSettings.bUseLobbiesIfAvailable = true;
SessionInterface->JoinSession(0, FName(“Game”), SearchResults[ID]);
still don’t understand why or how this change. some explanation somewhere owuld be nice

3 Likes

Replace SEARCH_PRESENCE macro with SEARCH_LOBBIES key or other query parameters depending on your requirements. These are defined in OnlineSessionSettings.h.

Yeah no, SEARCH_LOBBIES doesn’t work. The search result is still checking for is bPresence is enabled, and that doesn’t get set to true by any other macro. Or at least I cannot find the right other macro.

1 Like

did u solve the problem ? - if yes - please tell us

Well not entirely, only a workaround. its on my second reply on this post.

1 Like