Actors in sublevels do not replicate to Clients after Seamless ServerTravel. The user reporting this noted that "[...] UNetDriver::IsLevelInitializedForActor() keeps returning false even when the actor is shown in the client."

Test project available here:
[Link Removed]

Note that one cube is in the persistent level while the second is in the sublevel. The persistent level's cube will replicate changes in scale to the Client, the sublevel's cube will not. More detailed steps, if required, on the original AnswerHub post.

EDIT: Suggested source of problem and workaround by another user experiencing the same issue:

The problem lies in UWorld::AddToWorld (around line 1921), with this call being made on the client at the end of the server travel:

It->PlayerController->ServerUpdateLevelVisibility(PackageName, true);

This RPC never gets sent from the client to the server, and so the server never gets informed about the sublevel visibility for the client's connection. If you step into the RPC call you'll see why it's not sending - inside AActor::ProcessEvent it fails on a check to GetWorld()->AreActorsInitialized().

We looked around elsewhere in the codebase and found a gem inside NUTUtilNet.cpp on line 517 -

// Hack-mark the world as having initialized actors (to allow RPC hooks)
ReturnVal->bActorsInitialized = true;

It seems somebody else has experienced the same RPC limitation, haha! So back in UWorld::AddToWorld, if you hack bActorsInitialized = true then perform the ServerUpdateLevelVisibility RPCs, then restore the original bActorsInitialized value afterwards, everything works as expected.

Reproduced in 4.10.1 binary and Main (CL# 2795787)

Steps to Reproduce

1. Open the project found here: [Link Removed]
2. Play in Standalone Mode (Use Single Process disabled, Play as Listen Server, Players set to 2)
3. In the Server window, use console command, "ServerTravel Level1"

After travel, the Server sees both cubes continue scaling. The Client does not see the sublevel's cube scale.

Have Comments or More Details?

Head over to the existing AnswerHub thread and let us know what's up.

Login to Vote

Affects Versions4.104.114.13
Target Fix4.26
Fix Commit12123201
Main Commit14171693
CreatedDec 9, 2015
ResolvedMar 11, 2020
UpdatedFeb 4, 2021