How to save data for each player in multiplay game when changing level?

I’m trying to save what a player choosed in there PlayerController and save the array of the PlayerController in the GameInstance. Whereas when I wish to get the data after using command “ServerTravel”, They are all gone.
So how can I get save data when travelling?
One more question, do I have anyway to get all the login player, and how could I get there player controller in BP?

Try using the player states instead of player controllers. The actors which transfer from level to level are defined by this function:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/GetSeamlessTravelActorList/index.html

By default that is just player states. Whether you can access/change that in bp, I’ve no idea

Thanks, But the PlayerState also changed. Is it I changed the GameMode

hanks, But the PlayerState also changed. Is it I changed the GameMode that cause the playerController and the PlayerState cleared, though the two GameModes use the same PlayerController and PlayerState

And infact I found it’s hard to get my self choosed PlayState, I tried to get PlayState from PlayerController but it’s always null.

Playerstate should still be valid when APlayerController::ClientGameEnded() is called.

Player state is easy to get access to from anywhere but player state is specific to each player controller. Use the node “Get Player State” and it will need the player controller (I believe) and then cast player state to your custom player state. Just getting player state will return null because you are using a custom player state

Just getting player state will return null because you are using a custom player state

This is incorrect. It will return an APlayerState object. It will lack the interface of the custom player state (but not its functionality.)

Thank you guys, I’ll try again.