# How do you save GameInstance?

**URL:** <https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735>\
**Category:** Editor Scripting\
**Tags:** savegame, loading-phase, unreal-engine, Blueprint, question\
**Created:** [October 23, 2017, 3:54pm UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735 "2017-10-23T15:54:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![krishcrush](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@krishcrush](https://forums.unrealengine.com/u/krishcrush)\
**Post date:** [October 23, 2017, 3:54pm UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735/1 "2017-10-23T15:54:43Z")

</div>

Hey All, I’m just trying to figure out the savegame functionality of unreal

I currently have a project where I’m storing core user data such as name/health in a GameInstance

My question is, how can I save this data so it can be loaded when I close/open the project? I found a great tutorial which covers gameInstances ([UE4 - Using Game Instances & Persistent Variables - YouTube](https://www.youtube.com/watch?v=K_4CWDxwufg)) but it doesn’t go into detail about how to actually save the data inside the gameinstance once the game is closed. I have found various tutorials on saving/loading games, but they all involve creating a ‘saveGame’ blueprint, but I’m unsure how this type of blueprint is different from a GameInstance, and if they need to work together??

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 23, 2017, 4:10pm UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735/2 "2017-10-23T16:10:42Z")

</div>

GameInstance exists for as long as the game is running. Exit the game and the data is lost.

SaveGameObject gives you a chance to save the data directly to the hard drive and load it back again. The data does not have to be in the GameInstance. However, the GameInstance does persist when you switch levels which makes it a very good place to handle the saving. Since most blueprints have access to the GameInstance, it’s convenient to manage SaveGameObjects there.

The original docs:

> **[Saving and Loading Your Game](https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/SaveGame/)**
>
> Overview of how to save and load your game

And to answer your question directly: you do not save the GameInstance. You use a SaveGameObject to save data to the hard drive.

---

<div class="post-metadata">

**Author:** ![krishcrush](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@krishcrush](https://forums.unrealengine.com/u/krishcrush)\
**Post date:** [October 23, 2017, 4:25pm UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735/3 "2017-10-23T16:25:24Z")

</div>

Thanks @Everynone. So am I right in thinking that I use the SaveGameObject to call/save the variables in the gameInstance? ie. I currently store the player name as a GameIntance, would I then call this into the SaveGameObject and save it from there?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 23, 2017, 5:58pm UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735/4 "2017-10-23T17:58:50Z")

</div>

Yes, you can make the GameInstance into a hub that gathers and pushes data into the SaveGameObject.

---

<div class="post-metadata">

**Author:** ![eltano36](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@eltano36](https://forums.unrealengine.com/u/eltano36)\
**Post date:** [May 20, 2023, 10:52pm UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735/5 "2023-05-20T22:52:18Z")

</div>

The link doesn’t work anymore.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 19, 2023, 8:50am UTC](https://forums.unrealengine.com/t/how-do-you-save-gameinstance/407735/6 "2023-09-19T08:50:50Z")

</div>

Fixed.
