# Transfer PlayerState data during seamless travel

**URL:** <https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, UE4-8, seamless-travel, UE4-9, unreal-engine, bug-report, question\
**Created:** [September 17, 2015, 7:35am UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496 "2015-09-17T07:35:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [September 17, 2015, 7:35am UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/1 "2015-09-17T07:35:46Z")

</div>

Hi!  
I have alot of problem getting data transfered in PlayerState from my lobby-level to my game-level using seamless servertravel.

1. Host game: Create session ( in GameInstance - Blueprints)

2. Openlevel - lobby ( in GameInstance - Blueprints)

3. Add some values on server side to PlayerState (FString replicated)

4. Seamless travel to Game

5. My player state overrides CopyProperties

But then both PlayerStates (InParam and Current) is wiped, ie no values which i had before the travel is set

1. When i debug the existing instances of PlayerStates in the different maps i can see that,

In lobby before semaless travel: **MyPlayerstate\_2**

After semaless travel and in properties i have: **MyPlayerstate\_4** and **MyPlayerstate\_5**

**So, where did PlayerState\_3 go?** Which problably had my data set

I reproduced this in a from scratch project as well.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [September 22, 2015, 6:22pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/2 "2015-09-22T18:22:20Z")

</div>

Bumping the post

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [September 28, 2015, 8:01am UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/3 "2015-09-28T08:01:32Z")

</div>

Bumping the post 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [October 6, 2015, 12:31pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/4 "2015-10-06T12:31:08Z")

</div>

Would really appreciate if some1 at Epic took a look at this. Or how could i get some help otherwise, open for suggestions.

Best regards

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [October 14, 2015, 12:20pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/5 "2015-10-14T12:20:02Z")

</div>

Consider the matter bumped

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [November 14, 2015, 6:43pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/6 "2015-11-14T18:43:51Z")

</div>

Ok, after a second look at ShooterGame i solved the problem, apperently you must set the variabledefinition as below:

```
UPROPERTY(BlueprintReadOnly, Replicated, Category = "Preplan")
		TArray<UMinionDataWrapper*> MinionDataArray;	

void AShooterPlayerState::CopyProperties(class APlayerState* PlayerState)
{
	APlayerState::CopyProperties(PlayerState);

	if (PlayerState != nullptr)
	{
		AShooterPlayerState* ShooterPlayerState = Cast<AShooterPlayerState>(PlayerState);		
		if (ShooterPlayerState)
		{			
			
			ShooterPlayerState->MinionDataArray = MinionDataArray;			
			
		}
		
	}
}

```

Think the BlueprintReadOnly is the key here, hope some1else can get helped by this finding,

cheers!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8e60155f1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8e60155f1](https://forums.unrealengine.com/u/anonymous_user_8e60155f1)\
**Post date:** [November 16, 2015, 1:39am UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/7 "2015-11-16T01:39:39Z")

</div>

Hi ,  
So my understanding of SeamlessTravel is mostly based on this:

> **[Travelling in Multiplayer](https://docs.unrealengine.com/5.1/en-US/travelling-in-multiplayer-in-unreal-engine/)**
>
> An overview of how travelling works in multiplayer.

I don’t think its the BlueprintReadOnly, but the fact that PlayerState is “persisted” across a seamless travel. You can add more Actors to persist by putting it in the AGameMode::GetSeamlessTravelActorList()

My understanding is that Actors “persisted” across a SeamlessTravel is NOT the same Actor in memory; the persisted actor has its “count” increased (the \_1, \_13, etc), and certain data is copied across. In The case of PlayerState, there is an existing CopyProperties function which allows you to specify what to copy

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b467b02b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b467b02b](https://forums.unrealengine.com/u/anonymous_user_b467b02b)\
**Post date:** [November 16, 2015, 10:18am UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/8 "2015-11-16T10:18:10Z")

</div>

So did you try it out in the PlayerState/CopyProperties?  
I’ve read everything there is about this and it still didn’t work. I used BlueprintReadWrite on my UPROPERTY and it didn’t work, you are welcomed to try it and then we can compare results.

You can persist Actors by implementing GameMode::GetSeamlessTravelActorList() , “putting it” is kind of misdirected as it may be interpretated as to use a Set-function, override is better to use in this case imo.

Cheers!

---

<div class="post-metadata">

**Author:** ![lotodore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lotodore](https://forums.unrealengine.com/u/lotodore)\
**Post date:** [December 11, 2016, 6:08pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/9 "2016-12-11T18:08:00Z")

</div>

Thank you for sharing the solution. I have the same problem in a blueprint only project and this is really bad :-(. I can override CopyProperties in Blueprint, but it does not work. It will copy the properties, but for some reason not use the copy, as you wrote above. It seems that I need to implement PlayerState in C++.

---

<div class="post-metadata">

**Author:** ![Mingah](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mingah](https://forums.unrealengine.com/u/Mingah)\
**Post date:** [July 6, 2019, 9:24am UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/10 "2019-07-06T09:24:25Z")

</div>

**It is important to note that this only works for seamless travel. And since seamless travel does not work in the editor (up until at least UE 4.22), this will not work while debugging using the editor!**

You can use this in standalone (and thus the packaged build only!)

---

<div class="post-metadata">

**Author:** ![VortexFX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VortexFX](https://forums.unrealengine.com/u/VortexFX)\
**Post date:** [February 4, 2024, 2:42pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/11 "2024-02-04T14:42:28Z")

</div>

Seamless travel works now in PIE as of 5.1 you just need to set this in as a console variable  
net.AllowPIESeamlessTravel=1

You can also set console variables using the new Console variable plugin (Beta)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/4/4/244d944abc255b3c21ddfe8accf6056c09e45c67.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/c/edcc1355fbdf1c3bf1cd11072510775332eea437.png)

Hope this helps

---

<div class="post-metadata">

**Author:** ![PaIeFace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PaIeFace](https://forums.unrealengine.com/u/PaIeFace)\
**Post date:** [October 26, 2024, 5:55pm UTC](https://forums.unrealengine.com/t/transfer-playerstate-data-during-seamless-travel/332496/12 "2024-10-26T17:55:57Z")

</div>

Yes this is the solution, no need to set BlueprintReadOnly
