Getting max amount of players in a session, and getting the host of the session/game

After creating a session using the Create Session node in a blueprint, and switching to a new map as listen server


I want to get the maximum amount of players that this session can hold. I guess I can do that by storing the amount of players in a Game Instance, or something like that. I’m wondering if there’s a node to access the current session and get its data, because its odd that I can create a session but not access its variables.

In addition, I want to find the controller that is the host of the current session, and I can maybe patch something to do so, but isn’t there maybe a node that does that?

Thank You.

This feature would be nice!

It’s indeed weird you can’t get data from current session with a node.

i would like to know too how to retrieve some session information of the current session

This is something you can do via c++, you can setup a function that is blueprintcallable and get the session properties with:

    IOnlineSessionPtr Sessions = IOnlineSubsystem::Get()->GetSessionInterface();
    FOnlineSessionSettings* CurrentSettings = Sessions->GetSessionSettings(GameSessionName);
    int32 MaxConections = CurrentSettings->NumPublicConnections;