# What is the best way to keep data between levels?

**URL:** <https://forums.unrealengine.com/t/what-is-the-best-way-to-keep-data-between-levels/287513>\
**Category:** World Creation\
**Tags:** unreal-engine, question\
**Created:** [July 6, 2014, 4:22am UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-keep-data-between-levels/287513 "2014-07-06T04:22:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_f6530a3e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f6530a3e1](https://forums.unrealengine.com/u/anonymous_user_f6530a3e1)\
**Post date:** [July 6, 2014, 4:22am UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-keep-data-between-levels/287513/1 "2014-07-06T04:22:00Z")

</div>

I am working on a game where the player goes through various levels and quests to increase stats, but I can’t figure out the best way to keep the data between the levels. It seems strange to me that there isn’t some class that is persistent between levels that I can subclass to store data in. Currently I change levels using:

```
GetWorld()->ServerTravel(MapToPlay, false, false);

```

From what I have read so far, the two main options are:

1. Save the entire state of the game between each level, then reload it. This is guaranteed to work but isn’t trivial.

2. Someone suggested I put data in the LocalPlayer PlayerController. This seems a bit messy to me, and is it guaranteed to work in all circumstances?

Is there a better way?

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [July 7, 2014, 3:25am UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-keep-data-between-levels/287513/2 "2014-07-07T03:25:58Z")

</div>

#Config Files

For very small amount of data you can simply save it out to config file and then load it back

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

#Binary Save and Load

I have tutorial on how to save any data you want to compressed binary file and then load it back into the game!

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f6530a3e1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f6530a3e1](https://forums.unrealengine.com/u/anonymous_user_f6530a3e1)\
**Post date:** [July 7, 2014, 7:30am UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-keep-data-between-levels/287513/3 "2014-07-07T07:30:39Z")

</div>

Thanks , your tutorial is exactly what I’m using for loading/saving 🙂

---

<div class="post-metadata">

**Author:** ![HeliaXDemoN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HeliaXDemoN](https://forums.unrealengine.com/u/HeliaXDemoN)\
**Post date:** [January 12, 2021, 5:51pm UTC](https://forums.unrealengine.com/t/what-is-the-best-way-to-keep-data-between-levels/287513/4 "2021-01-12T17:51:04Z")

</div>

Just want to say here the ways:

1. Use level streaming and the game/state mode will not change.
2. Use the Game Instance, it don’t change between levels. You need to reset it if you leave to the main menu.
3. Use Save Game
