# A custom variable in the GameInstance is null after map change

**URL:** <https://forums.unrealengine.com/t/a-custom-variable-in-the-gameinstance-is-null-after-map-change/1987654>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [August 22, 2024, 3:21pm UTC](https://forums.unrealengine.com/t/a-custom-variable-in-the-gameinstance-is-null-after-map-change/1987654 "2024-08-22T15:21:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [August 22, 2024, 4:12pm UTC](https://forums.unrealengine.com/t/a-custom-variable-in-the-gameinstance-is-null-after-map-change/1987654/4 "2024-08-22T16:12:41Z")

</div>

> [@Topbleyzer](#):
>
> I see, it means that I should save some of my objects to make me able to access it anywhere when needed by loading them from files or any of saving type.

In Blueprints, saving _whole_ dynamically spawned actors / widgets is not really a thing. You instead save their data only - class, variables, components they had, and so on. After loading the game, respawn actors using the saved data.

* * *

Alternatively:

> [@\[PLUGIN\] Savior](https://forums.unrealengine.com/t/plugin-savior/110080):
>
> UPDATE: [PDF Documentation can be found here](https://www.dropbox.com/scl/fi/fy5x4tbsqv0ngtto6e72i/Savior_PluginDocs.pdf?rlkey=5ktwd8w12j05wefxphoiudo8y&st=jg11qnpl&raw=1)! WHAT is Savior: This is a major update for the “Auto-Save Game” system I’ve been maintaining up on Unreal Marketplace for last couple years. Focused on performance and data reach, I’ve totally scrapped original code and wrote this version from scratch, implementing a fully custom serialization engine that made possible for me to achieve the goal of moving away from the built-in ‘FArchive’ system and it’s ’ \<\< ’ operator constraints. The reason…

---

_[View the full topic](https://forums.unrealengine.com/t/a-custom-variable-in-the-gameinstance-is-null-after-map-change/1987654)._
