Dynamic level streaming in C++ with multiplayer support

G’day,

Is it possible to stream a map that isn’t a sub-level in a multiplayer game?

Everything I do works standalone or on the server, but nothing seems to get the client to load the streamed in level.

I feel I’m missing something important.

The basic code is as follows:

ULevelStreamingKismet* StreamingLevel = NewObject<ULevelStreamingKismet>(World, NAME_None, RF_Transient, nullptr);

StreamingLevel->bShouldBeLoaded = true;
StreamingLevel->bShouldBeVisible = true;
StreamingLevel->bShouldBlockOnLoad = false;
StreamingLevel->bInitiallyLoaded = true;
StreamingLevel->bInitiallyVisible = true;

StreamingLevel->SetWorldAssetByPackageName(MapName);
StreamingLevel->PackageNameToLoad = MapName;

World->StreamingLevels.Add(StreamingLevel);
World->FlushLevelStreaming();

I’ve tried using ClientUpdateLevelStreamingStatus(), ClientFlushLevelStreaming() etc without any luck.

Any input would be appreciated.

Kris

I’d like to know this as well

A little update to this issue.

I submitted a PR to Rama’s awesome Blueprint function library that includes a struct and function that can be combined to achieve the desired result.