Dynamic level streaming with multiplayer support

What I have found, If you are using the LoadLevelInstanceBySoftObjectPtr (c++), make sure the NAME attribute is exactly the same for clients and the Server.

Example:
LevelName = FName(TEXT(“MyLevelStreamed”));
ULevelStreamingDynamic::LoadLevelInstanceBySoftObjectPtr(this, LevelToStream, RootComponent->GetComponentLocation(), RootComponent->GetComponentRotation(), bLevelInstanceSuccess, LevelName.ToString());

After found this, I finally understood the logic behind. If you have an item inside your streamed level, but the level name is different on each client and the server, then in the end is not the same item for everyone. But if the level name is exactly the same on each one, then the item is also the same for everyone :slight_smile:

This seems to be the proper way to stream levels for Multiplayer.

If you have Multiples levels to Load, make sure to generate the level names exactly the same on every client and server.

Please remember that you can’t repeat the same level name over and over for the same client or server. Level name should be unique (but the same between your network players and server).

Hope I have explain myself well.

8 Likes