Skip to content

Save and Load

The simulator persists desktop layout, installed programs, filesystem changes, and per-program settings through Unreal’s save-game system. The entry point is UOperatingSystemSaveGame and per-program Save Method on UOperatingSystemBaseProgram.

flowchart TB
  subgraph row1[" "]
    direction LR
    Prog["UOperatingSystemBaseProgram"] --> Method["EOperatingSystemProgramSaveMethod"] --> Settings["UOperatingSystemProgramSettings"]
  end
  subgraph row2[" "]
    direction LR
    Device["UOperatingSystemBaseDevice"] --> SG["UOperatingSystemSaveGame"] --> Disk["Unreal SaveGame slot"]
  end
  Settings --> SG
EOperatingSystemProgramSaveMethodWhen data is written
SaveOnOperatingSystemShutdownOS shutdown/restart (not manual program close)
SaveOnExitProgram closed or OS shutdown
SaveManuallyOnly when you call Save Settings
DoNotSaveNever

Set Save Method and a Settings Class (subclass of UOperatingSystemProgramSettings) on your program Blueprint or C++ defaults.

  1. Create a Blueprint or C++ class derived from Operating System Program Settings.
  2. Add variables you want persisted (window position, user prefs, etc.).
  3. Assign as Settings Class on the program.
  4. Enable Remember Last Window Position on the program to auto-store window geometry when save method allows it.

Access at runtime:

Get Program Settings (cast to your settings class) → read/write properties
→ Save Settings (when using SaveManually)

The device actor and UOperatingSystemBaseDevice coordinate full OS snapshots — installed programs, directories, user manager data (FOperatingSystemUserManagerSaveData), and partition contents.

Battery events on portable devices can trigger saves when Battery Save State Flags are set — see Portable device.

UCLASS()
class UMyProgramSettings : public UOperatingSystemProgramSettings
{
GENERATED_BODY()
public:
UPROPERTY(SaveGame)
int32 HighScore = 0;
};
UCLASS()
class UMyProgram : public UOperatingSystemBaseProgram
{
GENERATED_BODY()
public:
UMyProgram()
{
SaveMethod = EOperatingSystemProgramSaveMethod::SaveOnExit;
SettingsClass = UMyProgramSettings::StaticClass();
}
};
  • Use Save Game checkbox on variables in your Settings Class Blueprint.
  • Call Save Settings from a button in your program widget when using SaveManually.
  • Test with PIE → stop → PIE again on the same map slot to verify reload.

Save games work in packaged builds. If custom terminal commands or program assets fail to load in a build, see Packaging.