Get session name as a server

I’m using the blueprint session nodes for creating and joining sessions. When using Find Sessions node, I get a nice array of Blueprint Session Result Structs that each contain the session’s name that I can save on the client side for later use.

When using Create Session node, however, I don’t get similar struct with the created session’s info.

So my question is: How can server find out it’s own session name?

It must be some sort of magic that they do not document so us peons never figure it out.

So im gonna sort of answer this on my jouny of creating a sever browser and finding this so anyone else who stumbles across it now has an answer, and that is to not to try it with the current unreal blueprint structure as getting the blueprint version of get server name if
[OnlineSubsystem] DefaultPlatformService=Null
then the default blueprint get server name will be the name of your computer
if it is
[OnlineSubsystem] DefaultPlatformService=Steam
than it will be your steam username

Not that helpful i know

The way to get around this is by adding your own custom properties to the session C++ it could look something like this (note this is just a snipit for adding a custom value not creating a whole session)

	FOnlineSessionSetting compoundSessionName;
			compoundSessionName.AdvertisementType = EOnlineDataAdvertisementType::ViaOnlineService;
			compoundSessionName.Data = userSessionName;
			SessionSettings->Settings.Add(FName("SESSION_NAME"), compoundSessionName);

and pulling it out of located session

FString sessionName = SessionSearch->SearchResults[SearchIdx].Session.SessionSettings.Settings.FindRef("SESSION_NAME").Data.ToString();

If your not fluent in C++ or Unreal C++ than don’t fear their is a free plugin provided by the user mordentral
and can be found here: Advanced Sessions Plugin - Community Content, Tools and Tutorials - Unreal Engine Forums

The way to add a name would be to use the extra settings and Get Session Property / Set Session Property nodes.

With a general set up then it is up to you to how to use the variables within your own game

Good luck :smiley:

Years later and we still have to use workarounds for so many basic things
are there any better solutions yet?