Click or drag to resize

IModPersistentData Interface

Allows primitive data types to be stored persistently inbetween mod loads. This is useful if the mod needs to store settings or other persistent information. Most games will disallow access to System.IO by default and as a result this interface is usually the only way to create persistent data. The interface is designed to mimic Unity's PlayerPres class as close as possible with a couple of extra features.

Namespace:  UMod
Assembly:  UMod-Interface (in UMod-Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public interface IModPersistentData

The IModPersistentData type exposes the following members.

Properties
  NameDescription
Public propertyAllKeys
Enumerates all saved keys for this mod.
Public propertyHasData
Returns true if there is any data stored for this mod.
Top
Methods
  NameDescription
Public methodClearAll
Clears all saved data for this mod.
Public methodExists
Checks whether a value exists for the specified key.
Public methodLoadBool
Attempts to load a boolean value from the persistent store.
Public methodLoadFloat
Attempts to load a floating point value from the persistent store.
Public methodLoadInt
Attempt to load an integer value from the persistent store.
Public methodLoadString
Attempts to load a string value from the persistent store.
Public methodSaveBool
Save a boolean value to the persistent data store.
Public methodSaveFloat
Save a floating point value to the persistent data store.
Public methodSaveInt
Save an integer value to the persistent data store.
Public methodSaveString
Save a string value to the persistent data store.
Top
See Also