# Where lost Instance variable

**URL:** <https://forums.unrealengine.com/t/where-lost-instance-variable/1268669>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [August 22, 2023, 10:11am UTC](https://forums.unrealengine.com/t/where-lost-instance-variable/1268669 "2023-08-22T10:11:23Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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 23, 2023, 8:36am UTC](https://forums.unrealengine.com/t/where-lost-instance-variable/1268669/5 "2023-08-23T08:36:04Z")

</div>

> [@Consoler\_whole](#):
>
> Is some advice how do it better?

You will need to save the game at some point, right? Best handle it now. You wouldn’t save the refs themselves, but the data that represents the actors / components / objects / widgets. And then respawn what is needed from said data.

> **[Saving and Loading Your Game in Unreal Engine | Unreal Engine 5.6...](https://dev.epicgames.com/documentation/en-us/unreal-engine/saving-and-loading-your-game?application_version=4.27)**
>
> Overview of how to save and load your game

Object references can be saved but if the objects themselves get destroyed (during level transition), the refs now point to nothing until their values are assigned again.

* * *

Alternatively, seek plugins that simplify the manual labour:

> [@\[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…

There may be similar ones on the marketplace.

---

_[View the full topic](https://forums.unrealengine.com/t/where-lost-instance-variable/1268669)._
