Silksong.DataManager 1.2.1

dotnet add package Silksong.DataManager --version 1.2.1
                    
NuGet\Install-Package Silksong.DataManager -Version 1.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Silksong.DataManager" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Silksong.DataManager" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="Silksong.DataManager" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Silksong.DataManager --version 1.2.1
                    
#r "nuget: Silksong.DataManager, 1.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Silksong.DataManager@1.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Silksong.DataManager&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=Silksong.DataManager&version=1.2.1
                    
Install as a Cake Tool

Silksong.DataManager

DataManager is a mod that saves and loads data - global as well as save slot-specific - on behalf of other mods.

Using the mod

To use DataManager as a developer, you will need to do the following:

  1. Add a dependency on the Silksong.DataManager NuGet package
  2. Add a BepInDependency attribute on your plugin class for the org.silksong-modding.datamanager plugin
  3. Implement one of the data interfaces provided by DataManager (discussed in more depth below)

As a simple example:


using Silksong.DataManager;
using BepInEx;

public class SaveData
{
    public long rngSeedForSomePurpose;
}

[BepInAutoPlugin(id: "io.github.username.my-mod")]
[BepInDependency("org.silksong-modding.datamanager")]
public partial class MyPlugin : BaseUnityPlugin, ISaveDataMod<SaveData>
{
    public SaveData? SaveData { get; set; }

    // rest of mod class
}

Types of data

DataManager supports global data, which is an alternative to BepInEx configuration, and per-save data which is effectively a modded extension to save data.

All data types are handled by generic interfaces, such as IGlobalDataMod<T> where T is the type of data you want to store. DataManager will automatically serialize your data as JSON at appropriate times. DataManager uses the Newtonsoft.Json library for serialization and the serialization behavior can be altered by using Newtonsoft.Json attributes in advanced use cases.

In the case that a mod needs to add its own data manually instead of or in addition to these interfaces, the paths used by DataManager can all be found in the DataPaths class.

Global data

Global data is available for cases where data is needed across multiple saves, or outside of saves such as in the menu. DataManager offers 2 types of global data which mod developers can choose between based on their use case. Save data is automatically sychronized across devices by Steam Cloud.

IProfileDataMod

IProfileDataMod<T> is ideal for mods that want a more powerful alternative to BepInEx configuration. Data is stored in the same location as BepInEx configuration files, which means that is scoped to your profile in the mod loader. It is loaded when the game opens and saved when the game closes; you can access it in your plugin's Start method.

IGlobalDataMod

IGlobalDataMod<T> is an alternative to IProfileDataMod<T> which is saved in the save data directory, in <save directory>/Modded/Global/<plugin ID>.json.dat. There are 2 benefits of this location:

  1. It will be synced across devices by Steam Cloud
  2. It will be available across multiple profiles

Therefore, if either of these use cases are relevant to your mod, you should use IGlobalDataMod<T>. Similar to IProfileDataMod<T>, this data is loaded when the game opens and saved when the game closes; you can access it in your plugin's Start method.

Save-specific data

Save-specific data is a way for your mod to add its own data to a save file. DataManager supports both mutable and immutable data.

IOnceSaveDataMod

IOnceSaveDataMod<T> provides immutable data which is set at the beginning of the file and never updated again. It is stored in <save directory>/Modded/userN/OncePerSave/<mod ID>.json.dat. Data is saved when a game starts, specifically at the end of GameManager.StartNewGame and loaded when loading into a file. Immutable data results in fewer disk operations which makes the game more performant, so developers are encouraged to use it when possible.

ISaveDataMod

ISaveDataMod<T> is used for all mutable save data. It is stored in <save directory>/Modded/userN/SaveData/<mod ID>.json.dat. Data is saved when the game is saved and loaded when loading into a file.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Silksong.DataManager:

Package Downloads
Silksong.Benchwarp

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.1 346 2/14/2026
1.2.0 126 2/14/2026
1.1.0 757 12/24/2025
1.0.2 205 12/21/2025
1.0.1 154 12/20/2025
1.0.0 142 12/20/2025