Profile catalogs and stable identifiers¶
Three identity layers serve different purposes. Confusing them is a common cause of saves that load into the wrong place or cannot resolve configuration.
| Identity | Scope |
|---|---|
| Context ID | Game-authored identity of one independently saved simulation; unique among a world's registered contexts |
| Profile ID | Unity .meta GUID mapped to a serialized asset reference in ProfileCatalog |
| Lifecycle binding ID | Scene-authored instance identity local to one TunalPersistence registry |
Neither a GameObject's display name nor a season's list index replaces these identifiers. Season/stage IDs additionally identify authored entries within their own profiles.
Build a catalog¶
- Create Assets > Create > Sital > Tunal > Profile Catalog.
- In its Inspector choose the scan scope and use Rebuild Profile Catalog. The default root is Tunal's
Runtime/Data; project-owned profiles outside that root must be included deliberately. - Confirm that every profile reference selected for saving resolves in the catalog, including lifecycle profiles when that feature is enabled.
- Assign the catalog to each participating TunalPersistence as appropriate. Validate after changing saved selections or adding profile assets.
The Editor populates asset GUIDs. A player build uses the serialized map, not AssetDatabase or asset-path searching. Keep referenced assets and their meta GUIDs; renaming/moving with GUID preservation differs from deleting/recreating or duplicating an asset with a new identity.
If a selected profile is absent from the catalog, correct the catalog coverage instead of disabling validation or replacing an unknown ID with a same-named asset. Saved references do not embed a historical copy of profile values, so changing authored profile contents can change behavior after loading an old save.
Context and storage keys¶
Use stable Context IDs before shipping saves. Local/world storage keys are 1–64 ASCII letters, digits, _, or -; they are keys, not arbitrary directory paths. World registration detects duplicate IDs case-insensitively. Use consistent casing and do not rename IDs casually after saves exist.
The World Persistence Inspector can help repair duplicate authored IDs, but a repaired ID may no longer match existing saves. Make that a deliberate migration decision rather than a routine action at startup.
Lifecycle IDs¶
Register actual scene instances in the owning persistence component. The Inspector generates/preserves binding IDs; do not put references to scene objects into a reusable prefab asset or regenerate every binding on load. Two unrelated contexts may have local IDs that happen to match, but the same instance cannot be registered under two owners in one world.
Profile replacement, missing stages, and renamed stage IDs can invalidate captured lifecycle state. Provide an explicit game save-version/migration policy for shipped content changes; Tunal's GUID map is not an automatic migration service.
Related: single-context setup, lifecycle registration, world policy.