Online Subsystem NULL : Cannot Find Sessions

Ok, found the issue. Yes it was related to which subsystem sessions were registered with.

I had read online in several places to retrieve the online subsystem like so:

auto OnlineSubsystem = IOnlineSubsystem::Get();
auto Sessions = OnlineSubsystem->GetSessionInterface();

But the callback proxies in the engine are actually doing this (paraphrased by me):

UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
auto Sessions = Online::GetSessionInterface(World);

Well turns out that Online::GetSessionInterface(World) and OnlineSubsystem->GetSessionInterface() do not return the same subsystem instance… no idea why.

But the solution was to use Online::GetSessionInterface(World).

3 Likes