What does SaveGame option in variable details panel do ?

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 ??


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 for more information.

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

You can’t in blueprint afaik.

what about cpp ?

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

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

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))

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?