# How can I store variables in all levels?

**URL:** <https://forums.unrealengine.com/t/how-can-i-store-variables-in-all-levels/291351>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [August 18, 2014, 7:32pm UTC](https://forums.unrealengine.com/t/how-can-i-store-variables-in-all-levels/291351 "2014-08-18T19:32:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Markar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Markar](https://forums.unrealengine.com/u/Markar)\
**Post date:** [August 18, 2014, 7:39pm UTC](https://forums.unrealengine.com/t/how-can-i-store-variables-in-all-levels/291351/2 "2014-08-18T19:39:47Z")

</div>

You could try way mentationed in [What is the best way to keep data between levels? - World Creation - Epic Developer Community Forums](https://answers.unrealengine.com/questions/65281/what-is-the-best-way-to-keep-data-between-levels.html) i.e.

"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 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...

🙂

"

EDIT:  
I found that in UE 4.4 is UGameInstance class that is persistent between levels. You can try using it.

---

_[View the full topic](https://forums.unrealengine.com/t/how-can-i-store-variables-in-all-levels/291351)._
