Skip to content

T_MSCLoader_SaveLoad

piotrulos edited this page Apr 7, 2023 · 4 revisions

SaveLoad Class

Save and Load Class for gameobject and custom class

Inheritance Hierarchy

System.Object
  MSCLoader.SaveLoad
Namespace: MSCLoader
Assembly: MSCLoader (in MSCLoader.dll) Version: 1.2.11.286

Syntax

C#

public class SaveLoad

View Source
The SaveLoad type exposes the following members.

Methods

 

Name Description
Public methodStatic member DeleteValue Delete value from Mods.txt (if exists)
Public methodStatic member DeserializeClass(T) Deserialize custom class from Unified save system
Public methodStatic member DeserializeSaveFile(T) Deserialize custom save class to custom file (see example)
Public methodStatic member LoadGameObject **Obsolete. ** Load position and rotation of single gameobject from file Call this AFTER you load your gameobject
Public methodStatic member ReadValue(T) Read saved value
Public methodStatic member ReadValueAs2DArray(T) Read saved value as 2D Array
Public methodStatic member ReadValueAsArray(T) Read saved value as Array
Public methodStatic member ReadValueAsDictionary(TKey, TValue) Read saved value as Dictionary
Public methodStatic member ReadValueAsHashSet(T) Read saved value as HashSet
Public methodStatic member ReadValueAsList(T) Read saved value as List
Public methodStatic member ReadValueAsQueue(T) Read saved value as Queue
Public methodStatic member ReadValueAsStack(T) Read saved value as Stack
Public methodStatic member SaveGameObject **Obsolete. ** Save position and rotation of single gameobject to file (DO NOT loop this for multiple gameobjects) Call this in OnSave() function
Public methodStatic member SerializeClass(T) Serialize custom class under custom ID in Unified save system
Public methodStatic member SerializeSaveFile(T) Serialize custom save class to custom file (see example) Call Only in OnSave()
Public methodStatic member ValueExists Check if saved value exists in save file.
Public methodStatic member WriteValue(T)(Mod, String, HashSet(T)) Write HashSet to save file
Public methodStatic member WriteValue(T)(Mod, String, List(T)) Write List to save file
Public methodStatic member WriteValue(T)(Mod, String, Queue(T)) Write Queue to save file
Public methodStatic member WriteValue(T)(Mod, String, Stack(T)) Write Stack to save file
Public methodStatic member WriteValue(T)(Mod, String, T) Write value to save file
Public methodStatic member WriteValue(T)(Mod, String, T[,]) Write 2D array to save file
Public methodStatic member WriteValue(T)(Mod, String, T[]) Write array to save file
Public methodStatic member WriteValue(TKey, TValue)(Mod, String, Dictionary(TKey, TValue)) Write Dictionary to save file
  Back to Top

See Also

Reference

MSCLoader Namespace

Clone this wiki locally