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)
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"
Result:
After travel, the Server sees both cubes continue scaling. The Client does not see the sublevel's cube scale.
Undefined sysmbol: typeinfo for AActor when cross-compile linux dedicated server on windows
Delay nodes occasionally don't fire the "Completed" output in a nativized build
I am not able to find world outliner how to enable it?
I can't open my map from the editor.
When I open UE4 4.24.3 it appears that. Does anyone know how to solve?
How can i modify the param name in EQS node
How to achieve HLSL Multiple Render Target in Material blueprints?
Head over to the existing Questions & Answers thread and let us know what's up.
39 |
Component | UE - Networking |
---|---|
Affects Versions | 4.10, 4.11, 4.13 |
Target Fix | 4.26 |
Created | Dec 9, 2015 |
---|---|
Resolved | Mar 11, 2020 |
Updated | Feb 4, 2021 |
6301 - gabriela-funcom |