SaveGame

Namespace: UAssetAPI.Unversioned

Represents an Unreal save game file. Parsing is only implemented for engine and custom version data.

public class SaveGame

Inheritance ObjectSaveGame

Fields

FilePath

The path of the file on disk.

public string FilePath;

SaveGameFileVersion

public ESaveGameFileVersion SaveGameFileVersion;

ObjectVersion

public ObjectVersion ObjectVersion;

ObjectVersionUE5

public ObjectVersionUE5 ObjectVersionUE5;

EngineVersion

public FEngineVersion EngineVersion;

CustomVersionSerializationFormat

public ECustomVersionSerializationFormat CustomVersionSerializationFormat;

CustomVersionContainer

All the custom versions stored in the archive.

public List<CustomVersion> CustomVersionContainer;

SAVE_MAGIC

public static Byte[] SAVE_MAGIC;

Constructors

SaveGame(String)

Reads a save game from disk and initializes a new instance of the SaveGame class to store its data in memory.

Parsing is only implemented for engine and custom version data.

public SaveGame(string path)

Parameters

path String
The path of the .sav file on disk that this instance will read from.

Exceptions

FormatException
Throw when the asset cannot be parsed correctly.

SaveGame()

Initializes a new instance of the SaveGame class. This instance will store no file data and does not represent any file in particular until the SaveGame.Read(UnrealBinaryReader) method is manually called.

public SaveGame()

Methods

PathToStream(String)

Creates a MemoryStream from an asset path.

public MemoryStream PathToStream(string p)

Parameters

p String
The path to the input file.

Returns

MemoryStream
A new MemoryStream that stores the binary data of the input file.

PathToReader(String)

Creates a BinaryReader from an asset path.

public UnrealBinaryReader PathToReader(string p)

Parameters

p String
The path to the input file.

Returns

UnrealBinaryReader
A new BinaryReader that stores the binary data of the input file.

Read(UnrealBinaryReader)

Reads a save game from disk.

Parsing is only implemented for engine and custom version data.

public void Read(UnrealBinaryReader reader)

Parameters

reader UnrealBinaryReader
The binary reader to use.

PatchUsmap(String)

Patches a .usmap file to contain the versioning info within this save file.

public void PatchUsmap(string usmapPath)

Parameters

usmapPath String
The path to the .usmap file to patch.