Beacon cannot be combined with seamless travel

It looks like this
question.

Because it seems that none noticed it, I post again to get some help.

Hey mikechan,

I’m currently looking into this issue; and I will respond as soon as I have new information

The short answer is beacons are derived from AActor and so they cannot seamlessly travel in a simple and straightforward manner.

Beacons, by their nature, were meant to be quick connections to retrieve some information or to tell a server something and disconnect. Internally, we tear down and recreate beacon hosts when we travel from level to level. Clients only need to be connected briefly to make a reservation (APartyBeacon) or to connect to a lobby before really traveling to the server (ALobbyBeacon).

If you look at APartyBeacon, it contains a UObject, UPartyBeaconState that contains the data that needs to survive server travel. It is connected to the online code and survives garbage collection via GetNamedInterface(). It’s basically an AddToRoot() call. On the other side a new APartyBeaconHost is created and the UPartyBeaconState is retrieved, restoring the state prior to the travel.

Having a timeout value allows servers to travel without an active beacon while new clients wait for the server to get back into a good state to receive the connection again. Existing clients are already connected more officially and seamless travel as normal.

There are ways to improve this but since things are stable with the way we do it now there hasn’t been time to address it more robustly.

Inside FSeamlessTravelHandler::Tick, we would have to add some code that migrates the net driver and all actors associated with beacons. That would prevent the crash people are seeing where the old UWorld is still associated with the beacon code and can’t be garbage collected.

That isn’t enough though, the seamless travel code would need code similar to HandleSeamlessTravelPlayer that finds the actors and properly sets them back up on the AGameMode or appropriate location. Otherwise you have to TActorIterator somewhere during InitGame in order to retrieve the actors that survived the garbage collection on travel.

I would be happy to advise if you wanted to try some of this migration yourself.

1 Like

Hello. I’m just suffering from that problem right now. I would like to try it out, please give me some advice.