# Cant save the player controller in Game Instance

**URL:** <https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059>\
**Category:** Multiplayer & Networking\
**Tags:** game-instance, unreal-engine, Multiplayer, question\
**Created:** [December 23, 2016, 12:01pm UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059 "2016-12-23T12:01:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [December 23, 2016, 12:01pm UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/1 "2016-12-23T12:01:47Z")

</div>

I make a Local Multiplayer like this [Blueprint Implementing Local Multiplayer | Live Training | Unreal Engine - YouTube](https://www.youtube.com/watch?v=ZOc9fV6Sap4) .  
In every mapchange I lost the player on his controller. And I cant save the Player Controller in a Game Instance. This Instance work fine with other variables, but not with Player Controllers. Is there a trick or any other way to keep the player by changing the map?

Edit: I want to keep the inputhardware of every Player. for exampe: Player 0 play the keyboard, Player 1 with gamepad 2 and Player 2 with gamepad 1

---

<div class="post-metadata">

**Author:** ![Pariah013](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pariah013](https://forums.unrealengine.com/u/Pariah013)\
**Post date:** [January 2, 2017, 8:57am UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/2 "2017-01-02T08:57:49Z")

</div>

I’m not 100% sure if you’re speaking only to local mp or networked, but for local can use this tutorial as a good guide to setup possession to always be on a specific controller. [https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/PossessPawns/Blueprints/](https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/PossessPawns/Blueprints/)

---

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [January 2, 2017, 11:21am UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/3 "2017-01-02T11:21:17Z")

</div>

Thank you for your time. I know this tutorial but it dont help me. My Problem is the gameinstance dont keep or save the inputdevice of the players. If I search a resolve I found many guys with this problem, but no good solution. I avoid this problem with working levelinstance. The Mainmenue and every map is one level and i change the environments only by using another level instance, but not open a New level. So i keep EVERYTHING i want from Start till End.

---

<div class="post-metadata">

**Author:** ![Pariah013](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pariah013](https://forums.unrealengine.com/u/Pariah013)\
**Post date:** [January 2, 2017, 8:26pm UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/4 "2017-01-02T20:26:36Z")

</div>

Have you tried creating a custom structure and adding the player controllers to it to be stored as variables in that fashion? I’m mocking up a test for it right now to see if it would work, but that’s one of the possible solutions that hit me when I read your post again. Sorry I didn’t fully touch on the core problem to begin with.

---

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [January 3, 2017, 4:46am UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/5 "2017-01-03T04:46:26Z")

</div>

It’s OK. Sure I did. But after loading another map there is no player controller in the gameinstance, save everything, but not the Player Controllers. I will rebuild this Problem today and post some Screenshots.

---

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [January 3, 2017, 2:35pm UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/6 "2017-01-03T14:35:03Z")

</div>

Pressing the button to spawn a character, works fine

 ![120655-gamecontrollers.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/c/d8c902c4e46f4b8499f34cd6b8ba306fea4d7e56.jpeg)

All happens in the gamemode and it cast to gameinstance the PlayerControllers, works fine too

 ![120656-gamemode.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/e/e9ed8bf8c0d282f8698badb8e1194b55b6c151ec.jpeg)

I change the map and the gameinstance dont keep/save the PlayerControllers

 ![121134-gameinstance.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/0/30042f86a1ee24081775a287f08a3a6b5d0ca21a.jpeg)

I want to keep every Player with his own Inputdevice (Gamepad or mouse or whatever) on every new map without press a button again and again. Only at the Gamestart every player must pess a button. But the Instance dont save this. Iam not sure PlayerController is the right to make this.

---

<div class="post-metadata">

**Author:** ![Darrel\_Leigh](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Darrel\_Leigh](https://forums.unrealengine.com/u/Darrel_Leigh)\
**Post date:** [April 25, 2018, 7:01pm UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/7 "2018-04-25T19:01:38Z")

</div>

Did you solve this, I would love to know how to.

---

<div class="post-metadata">

**Author:** ![Pypatron](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Pypatron](https://forums.unrealengine.com/u/Pypatron)\
**Post date:** [April 27, 2018, 5:46am UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/8 "2018-04-27T05:46:08Z")

</div>

No, I never got the problem solved, I think it’s not possible. In my case, I have just run everything in a map and just uploaded levelinstances. but there are certainly other ways to use.  
For example, you can include a “ready button” where each player must press a button to be “ready”.

---

<div class="post-metadata">

**Author:** ![GG-GoraGames](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gg-goragames/32/1081623_2.png) [@GG-GoraGames](https://forums.unrealengine.com/u/GG-GoraGames)\
**Post date:** [September 13, 2023, 8:37am UTC](https://forums.unrealengine.com/t/cant-save-the-player-controller-in-game-instance/380059/9 "2023-09-13T08:37:22Z")

</div>

I know it’s quite an old post, but I encountered the same problem and investigated a bit. Here is what I found:

The problem arises when you save your PlayerController in the game instance; it stores the reference, not the data. So when you switch levels, the reference is lost, and the saved data are also lost. I tried everything, but there seems to be no way to store a copy of the player controller data. My workaround is to create a struct with string, bool, and int variables and copy over the data I need to store for the next level. Another workaround is to use “OnSwapPlayerControllers” in the GameMode. This event gets triggered every time you switch levels (via ServerTravel), and it provides access to both the old player controller and the new player controller. Here, you can access the old player controller and forward your stored data to the next level. This way, you can always bring your player controller data to the next level an infinite number of times.

There is another way as well; you can use “playerstat” to store the information you’d like to keep and then save it in the game instance. I’ll give it a try and update this post if it works well for me.

I hope this helps you all in the future. 🙂
