unfurl

Session

Rooms with a short code over LAN and Steam for Unreal Engine.

Rooms with a short code over LAN and Steam for Unreal Engine.

👀 Summary

NsSession gives multiplayer rooms with a 5-letter code, like KXQTP. The host opens a map and gets a code. A friend types the code and joins. A room is a Steam lobby when Steam runs, and a LAN session in other cases. When the nearby Steam search finds nothing, a second search looks in every region.

NsSession has no UI, no session browser, no player names, and no map setting. Your game gives the map, shows the status lines, and opens the title map after a leave.

📦 Features

⚙️ Requirements

🛠️ Installation

  1. Clone or download this repository.
  2. Copy the NsSession folder into the Plugins folder of your project.
  3. For C++, add "NsSession" to the dependencies of your game module in Build.cs.
  4. Generate the project files and enable the plugin.
  5. For Steam, set the connection class of the Steam net driver in DefaultEngine.ini:
[/Script/SteamSockets.SteamSocketsNetDriver]
NetConnectionClassName="/Script/NsSessionSteam.NsSteamNetConnection"

🚀 Getting Started

In Blueprint, get the subsystem with Get Ns Session Subsystem. Call Host Room with a map, or Join Room with a code. Bind On Room Status and show Get Status Text of each status.

In C++:

#include "NsSessionSubsystem.h"

// RoomMap is a TSoftObjectPtr<UWorld> property of the menu.
void UMyMenu::Host()
{
    UNsSessionSubsystem::Get(this)->HostRoom(RoomMap.ToSoftObjectPath());
}

void UMyMenu::Join(const FString& Code)
{
    UNsSessionSubsystem::Get(this)->JoinRoom(Code);
}

// Bound to OnRoomStatus. OnRoomStatus is a dynamic event, so this handler is a UFUNCTION.
void UMyMenu::HandleRoomStatus(const FNsRoomStatus& Status)
{
    StatusText->SetText(Status.GetDefaultText());
}

🧩 Modules

Module Platforms Content
NsSession All The subsystem, the status types, and the worldwide Steam search (Win64)
NsSessionSteam Win64 UNsSteamNetConnection

🔧 API

🚧 Limits

📚 Documentation


Contact