Click or drag to resize

Savegame Class

Manages the saving and loading of gamedata to and from files.
Inheritance Hierarchy

Namespace:  SavegamePro
Assembly:  SavegameProDLL (in SavegameProDLL.dll) Version: (
public class Savegame

The Savegame type exposes the following members.

Public methodSavegame(SavegameSettings)
Creates a savegame with settings and default UnitySurrogateSelector.
Public methodSavegame(SavegameSettings, SurrogateSelector)
Creates a savegame with the settings and selector.
Public propertyFullFilePath
Returns the full filepath to the savegame file
Public propertyFullFilePathSurrogates
Return the full filepath to the file containing additionally saved types
Public propertySurrogateSelector
Returns the SurrogateSelector of this Savegame
Public methodAddSurrogateForType
Add a default surrogate for type
Public methodClear
Removes all saved gamedata.
Public methodDeleteFromDisk
Deletes the savefile from disk and clears all saved gamedata.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLoadT(String)
Load an object with its unique key. If the key is not found, this method throws an ArgumentException.
Public methodLoadT(String, T)
Load GameObjects, Components and other UnityEngine types with their unique key. If the key is not found, this method throws an ArgumentException.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadFromDisk
Reads gamedata from disk and makes it available to load.
Public methodRemove
Removes saved gamedata with the given key.
Public methodSave
Save an object with a unique key. If the key already exists, the value is overwritten. The object must be serializable. If the object is not serializable and does not have a serialization surrogate, an ArgumentException will be thrown.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteToDisk
Writes all gamedata to disk. Will create a directory and/or file if needed.
Public fieldStatic memberLogging
Sets the LogLevel when saving or loading. Default is LogLevel.ReadingWriting.
See Also