# What does SaveGame option in variable details panel do ?

**URL:** <https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119>\
**Category:** Editor Scripting\
**Tags:** savegame, unreal-engine, UE4, Blueprint, question, CPP\
**Created:** [August 27, 2015, 5:54pm UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119 "2015-08-27T17:54:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_46e6cfb5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_46e6cfb5](https://forums.unrealengine.com/u/anonymous_user_46e6cfb5)\
**Post date:** [August 27, 2015, 5:54pm UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/1 "2015-08-27T17:54:20Z")

</div>

i’ve save the game like normal way but i just know there is an option called SaveGame in variables details panel ! so what does exactly this option do ??

![56073-untitled.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/2/0d2fc338c668880bbe8c5cdd19b1dcf4a254b587.jpeg)

---

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [August 27, 2015, 6:12pm UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/2 "2015-08-27T18:12:42Z")

</div>

Its just another flag that can be turned on or off for a UPROPERTY.  
The non-blueprint/real way of saving using the existing systems involve making a FObjectAndNameAsStringProxyArchive subclass with ArIsSaveGame set to true. When a class is saved to the archive only the properties with the SaveGame flag set are serialized.

See Ben Zeigler’s answer [here](https://answers.unrealengine.com/questions/35618/savingloading-an-array-of-objects.html?sort=oldest) for more information.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_46e6cfb5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_46e6cfb5](https://forums.unrealengine.com/u/anonymous_user_46e6cfb5)\
**Post date:** [September 3, 2015, 7:29am UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/3 "2015-09-03T07:29:36Z")

</div>

can we get all the variables that this value set True on them and save them ?

---

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [September 3, 2015, 7:38am UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/4 "2015-09-03T07:38:03Z")

</div>

You can’t in blueprint afaik.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_46e6cfb5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_46e6cfb5](https://forums.unrealengine.com/u/anonymous_user_46e6cfb5)\
**Post date:** [September 3, 2015, 7:56am UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/5 "2015-09-03T07:56:17Z")

</div>

what about cpp ?

---

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [September 3, 2015, 8:05am UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/6 "2015-09-03T08:05:32Z")

</div>

Uobject serialize already does that logic when it loops over all uproperties and checks their flags.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_46e6cfb5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_46e6cfb5](https://forums.unrealengine.com/u/anonymous_user_46e6cfb5)\
**Post date:** [September 3, 2015, 8:38am UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/7 "2015-09-03T08:38:15Z")

</div>

can you give me a link or something for more information ?

---

<div class="post-metadata">

**Author:** ![anon26705860](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon26705860](https://forums.unrealengine.com/u/anon26705860)\
**Post date:** [September 3, 2015, 6:09pm UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/8 "2015-09-03T18:09:35Z")

</div>

The code isn’t the easiest to understand, but checkout UProperty::ShouldSerializeValue and follow through that chain.  
For example:  
if (Ar.IsSaveGame() && !(PropertyFlags & CPF\_SaveGame))

---

<div class="post-metadata">

**Author:** ![RC-1290](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rc-1290/32/261500_2.png) [@RC-1290](https://forums.unrealengine.com/u/RC-1290)\
**Post date:** [April 12, 2022, 9:40am UTC](https://forums.unrealengine.com/t/what-does-savegame-option-in-variable-details-panel-do/330119/9 "2022-04-12T09:40:23Z")

</div>

Unreal broke the link to the answers site, so I’m guessing it’s about this post:

# [What is the best way to handle Saving/Loading an Array of Objects?](https://forums.unrealengine.com/t/what-is-the-best-way-to-handle-saving-loading-an-array-of-objects/281775/7)
