Namespace CodeSmile.AnyMotion.Core.SaveLoad

Classes

DefaultSaveSystem

The default ISaveSystem composition: JSON text over plain files. Convenience for the common case; build a SaveSystem directly when a different serializer or file I/O is needed instead.

JsonUtilityTextSerializer

The only format in use today. See serialization-format-decision.md for why.

LoadException

A load operation failed. See System.Exception.InnerException for the underlying cause.

SaveException

A save operation failed. See System.Exception.InnerException for the underlying cause.

SaveLoadException

Base for every exception SaveSystem wraps an underlying failure in.

SaveSystem

Default ISaveSystem. Wraps expected I/O and format failures into a Result rather than throwing, so callers never need a try/catch around Save or Load. Exceptions outside that expected set — eg a bug in a custom ITextSerializer — still propagate, because those are programming errors, not the external-input failures this exists to handle.

SystemFileIO

Plain System.IO.File wrapper. Works in the Editor and in builds.

Structs

LoadResult<T>

Outcome of a load. Never throws — check Success instead, per serialization-format-decision.md's "must never fail to load" requirement.

SaveResult

Outcome of a save. Never throws — check Success instead, per serialization-format-decision.md's "must never fail to load" requirement applied to saving too.

Interfaces

IFileIO

Reads and writes preset text at a file path. Knows nothing about JSON or ScriptableObjects, so it can be swapped or mocked independently of both.

ISaveSystem

Saves and loads preset-shaped data as text. Composes an ITextSerializer and an IFileIO; knows nothing about PresetAsset<T> or ScriptableObjects, so it is reusable for any serializable data, not only preset assets.

ITextSerializer

Converts preset data to and from a text representation. Isolated behind an interface so the format can change (eg JSON to a binary format) without touching file I/O or the save system that composes this with it.

IVersionedData

Opt-in schema check for a preset data type. Load<T>(string) refuses a document whose Version this build does not read, so a file written by a newer build is reported as a version mismatch rather than loaded with some of its fields silently wrong.