Skip to content

Saving and loading

system.CaptureState() returns attribute base values, loose tags, granted abilities and active effects with their remaining time, stacks, next period tick and set-by-caller values; RestoreState rebuilds them, without re-executing effects. With assets, a Save Catalog (Create → Arcana → Save Catalog, then Collect All) finds effects and abilities by name:

string json = player.ToJson();                       // AbilitySystemComponent extension, Unity's JsonUtility
player.RestoreFromJson(json, saveCatalog);           // returns (and logs) what it could not restore

Running abilities are not saved (they restart idle), nor the effects they own, nor the source of effects. The state is a plain [Serializable] class, so other serializers work too.