What's that "Save Game" option in the Structure drop down list of each element?

Hi, I noticed there’s this in structure:

Anyone knows what that does?

That flag is related to the an option with the FArchiver class to limit the information that is included in savegames. You don’t always want to write out every member when serializing object or structures and this lets you filter that a bit.

It doesn’t look like it’s relevant if you’re using the USaveGame object provided by the Engine. And if you’re only working in blueprint you can’t create/use the FArchiver class.

So it’s one of those cases where if you don’t know what it does, you’re probably not doing anything that requires you to know when to set it.

2 Likes

Well, what else can you use besides USaveGame? I thought that was the only option.

1 Like

Nope, not at all. It might be the only option for a Blueprint Only project but not for one that is using C++.

That project could be using USaveGame + a custom archiver which uses the SaveGame flag or it could be doing it without the USaveGame and using a custom archiver.

By the time that you get down to calling ISaveGameSystem::SaveGame (which is what the GameplayStatics function eventually calls, it just takes a TArray<uint8> of data to write to a file. So you could, in theory, create your save data without using a UObject at all though I don’t recommend it.

For Marvel’s Midnight Suns I wrote an entirely separate save system that had a slightly different file format from what GameplayStatics would do with a USaveGame. But it also handled compression, file corruption and a separate header object that could be loaded without loading the whole save. Things that the base system doesn’t do. But also things that most people don’t need.

USaveGame is fine, until it’s not. But if you’re using USaveGame it doesn’t look like that flag does anything.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.