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

1 Like

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

5 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

THANK YOU!

This helped me realize I needed to actually search for lobbies, even though I thought I wasn’t, like Draug suggested.

	 LastSessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

became

	LastSessionSearch->QuerySettings.Set(SEARCH_LOBBIES, true, EOnlineComparisonOp::Equals);

for me. That made me see WAY more results in the LogOnlineSession logs. But after that, I wasn’t able to join my game. Then I noticed another log after it listed all the found sessions

[2025.06.28-20.59.57:781][224]LogOnlineSession: Warning: STEAM: [FOnlineSessionSteam::JoinSession] The values of FOnlineSessionSettings::bUsesPresence and FOnlineSessionSettings::bUseLobbiesIfAvailable are treated as equal and have to match

So this must be a new requirement going up Unreal Engine versions. Once I set those two keys on the search result before joining it, I got it to work too!

			Result.Session.SessionSettings.bUsesPresence = true;
			Result.Session.SessionSettings.bUseLobbiesIfAvailable = true;
			MultiplayerSessionsSubsystem->JoinSession(Result);

What I’m confused about is why the connecting client would have to set session settings. Wouldn’t they be coming from the host? Those bools are already set when I created the session, it’s weird we have to set it here too before joining.