Skip to content

API reference Obsidian.API.Data

SavedData<TValue> class

A live saved value. Access Value on its owning level's tick, or with your own synchronization. MarkDirty publishes a detached saved snapshot; world saves never call plugin code. Never retain this handle across plugin reloads.

public sealed class SavedData<TValue>

In Obsidian.API.

Properties

Value

public TValue Value { get; }

The live plugin object. Mutating it requires MarkDirty before the next save.

Methods

MarkDirty()

public void MarkDirty();

Encodes the current value now, marking it for the next save. Throws after unload or replacement.

On this page