Skip to content

📦 Snapshots (Internal)

Internal data structures and storage abstractions used by the snapshot system.

This folder contains serialization-layer types used behind the public snapshot API.


🎯 Purpose

Provide data transfer objects and storage abstractions for serializing inventory and equipment state.


🧩 What Lives Here

  • ItemStackDTO → serialized item stack representation
  • InventorySnapshotDTO → serialized inventory state
  • EquipmentSnapshotDTO → serialized equipment state
  • EquipmentSlotDTO → serialized equipment slot entry
  • GameInventorySnapshotDTO → root snapshot object
  • MetaKV → metadata key/value pair
  • IInventorySnapshotStore → storage abstraction for snapshots

⚠️ Important Notes

  • This is not a supported public API surface
  • Types may change between versions
  • Used internally by snapshot systems only

🧠 Usage Guidance

DTO layer

DTOs are simple data containers used for serialization.

  • contain no runtime logic
  • contain no Unity object references
  • designed for JSON conversion

Runtime separation

Runtime objects are not serialized directly.

DTOs provide a safe translation layer between runtime state and serialized data.


Snapshot structure

Snapshots may include:

  • inventory slot data
  • equipment slot mappings
  • version information

Ordering and structure depend on the runtime snapshot process.


Metadata handling

Metadata is represented as key/value pairs.

  • empty keys may be ignored
  • later entries may override earlier ones

Storage abstraction

IInventorySnapshotStore defines optional persistence behaviour.

It may be used to support alternative storage strategies.


🚫 Not for Production Use

This folder does not:

  • Provide snapshot capture or apply logic
  • Perform item lookup or validation
  • Define container mutation behaviour
  • Enforce authority