Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Latest commit

 

History

History
23 lines (18 loc) · 666 Bytes

File metadata and controls

23 lines (18 loc) · 666 Bytes

LethalDataAPI

Important

You have to sync data yourself. It doesn't do it automatically. You cannot load save or load data on Awake() in your Plugin.cs File.

How To Use

// This will prevent other mods data to be mixed in with your data.
public static LethalData storage = new LethalData(modName); 

private int exampleVariable

public void SaveData() {
    // Save(string key, T value)
    // The key has to be unique and it dosen't have to be the variable name.
    storage.Save("exampleVariable", exampleVariable);
}

public void LoadData() {
    // Load<Type>(string key)
    exampleVariable = storage.Load<int>("exampleVariable");
}