preserving data on seamless travel.

Hi,

I am working on a multiplayer game. I am planning to have some variables in the player controller and some on game mode. I read about seamless travel and it seems like a perfect way to preserve the data from lobby to the level.
But the data in the player controller is reset when the new level is loaded.

I have set the seamless travel to true in the game mode.
The two levels has different game modes but the same playercontrollers.
According to the log, seamless travel is successful and NotifyLoadedWorld has been called on player controller:

LogWorld: Sending NotifyLoadedWorld for LP: LocalPlayer_0 PC: PalyerController3Bp_C_0
LogNet: Verbose: NotifyLoadedWorld Begin
LogNet: Verbose: NotifyLoadedWorld End
LogWorld: ----SeamlessTravel finished in 0.16 seconds ------

I tried setting a different type of player controller as well. In that case, only the new controller is present in the level.
Is there anyway I can preserve data on game mode and controllers?

I only know a bit about networking and help will be appreciated

Thanks,

Most people end up using Game Instance to store global variables, it’s one of the only classes that stays persistent when changing levels.
There’s also a newer implantation called sub systems but I haven’t tried it yet.
https://docs.unrealengine.com/en-US/…nce/index.html
https://docs.unrealengine.com/en-US/…ems/index.html

Sorry, but I am wondering about this comment. I read last two days a lot about seamless travel, and when this is true, then UE official documentation has a big mistake because it says Controller and GameMode can be persistent through seamless travel. Or how to understand this … or what point do I miss?
https://docs.unrealengine.com/en-US/…seamlesstravel

At the moment I have the same problem as the threat creator. I get reset on seamless travel but getting no error on seamless travel. So it seems seamless travel is configured fine. But still staes and especially values of GameMode (I save all Player Controller Refrences there after Login of a player) gets resettet. I also wondering why.
How this part of documentation (https://docs.unrealengine.com/en-US/…seamlesstravel) is meant? Or how to get GameMode values persistent thorught seamless travel per server travel?

Help very welcome!

Hi.

Just seen this reply.
I had a look at the source code around seamless travel especially around Tick() method. It seems that the base class virtual functions for seamless travel mentioned in the remarks here https://docs.unrealengine.com/en-US/…vel/index.html such as PostSeamlessTravel() has code for resetting data. Please check the base class code and you will need to make your own overrides where you want to preserve the data e.g., in game mode.

Thanks