[Iris] Seamless travel not working in 5.6

Hi,

We’re currently on 5.6 and it likely won’t be feasible to upgrade to 5.7 given the risks involved and our current timeline. From the release notes for 5.7 I see Epic was able to get seamless travel working with Iris, which is something we were just about to jump into investigating ourselves. Any advice or tips on how best to cherry pick these changes from 5.7 would be greatly appreciated.

Thanks,

Nick

Hi,

Seamless travel support for Iris was added in CL 43916020 in UE5/Main. Since then, the changes related to seamless travel in Iris have been focused on fixing issues in some test projects (CLs 46412786 and 46466872), so while you wouldn’t need to cherrypick these specifically, they may be a helpful reference if you run into similar issues. I believe there’s also at least one other known issue related to dependent actors triggering ensures after travel.

If you do run into problems after cherrypicking this change, please don’t hesitate to reach out.

Thanks,

Alex

Thanks Alex this is huge for us! I’ll keep you posted in this thread if we run into anything or make any meaningful changes.

Best,

Nick

Hey [mention removed]​, looks like we have run into an issue, though I’m not certain this issue is specific to Iris.

Consider the following order of events:

  1. Client and server are both performing seamless travel in parallel
  2. Client finishes loading the new map and sends the APlayerController::ServerNotifyLoadedWorld RPC
  3. The server receives said RPC and updates the client’s connection accordingly
  4. The server finishes seamless travel and calls AGameModeBase::InitSeamlessTravelPlayer since the client has already indicated that it’s loaded the correct world, however all subsequent client RPCs fail due the fact that we haven’t called UWorld::BeginPlay yet
SendRPC ClientGotoState for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientSetHUD for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientVoiceHandshakeComplete for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientEnableNetworkVoice for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientRestart for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientSetViewTarget for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientSetCameraMode for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).
SendRPC ClientSetRotation for JunoPlayerController_BP_C_2147464081 Failed. This rootobject is not yet replicated (RefHandle: NetRefHandle (Id=128396):(RepSystemId=0) Index: 0).

Edit 1: Turns out this is likely an Iris only issue since it would seem that vanilla replication would have just let the RPCs get queued on the Actor’s replication channel.

Hi,

Thank you for bringing this to our attention!

I’ve been able to reproduce this myself, and I’ve opened a new issue for this, UE-354365, which should be visible in the public tracker in a day or so.

In the meanwhile, it’s hard to say how best to work around this. Switching the order of the calls to “LoadedWorld->BeginPlay()” and “GameMode->PostSeamlessTravel()” in FSeamlessTravelHandler::Tick did result in the warnings no longer being hit, but while there weren’t any noticeable issues with doing this in my test project, it’s possible that changing this order could have unexpected side effects.

Another option could be to override the GameMode’s functions for post seamless travel handling, allowing your project to still handle player initialization after travel while deferring the RPC calls to after BeginPlay.

Thanks,

Alex

Thanks Alex,

We ended up attacking this by making a change to AGameModeBase::PostSeamlessTravel. As we’re looping the player controllers we’ll only call HandleSeamlessTravelPlayer in the case that the world has begun play, if not then we’ll bind a delegate to UWorld::OnWorldBeginPlay and execute HandleSeamlessTravelPlayer at that time. So far it’s testing well, let me know if you see any issues with this approach.

Thanks,

Nick

Hi,

Nothing immediately stands out as a potential issue with this approach, but if you do run into any problems, please don’t hesitate to reach out!

Thanks,

Alex