Save Load UI

A themeable Save Load UI for Crystal Save

SaveSlotsRuntimeUI is a MonoBehaviour that builds a scrollable, canvas‑based list of save slots at runtime. It reads the slot definitions from the project's SaveSettings, dynamically instantiates a UI entry for each one, and lets designers selectively enable or disable UI features. The component subscribes to SaveManager events so that the slot list refreshes when data changes, and it hides its canvas while screenshots are captured to avoid appearing in saved images

How to add it to your scene

Right-Click in your Hierarchy-Window, select Crystal Save/UI/Save Menu

Settings

  • UI Setup

    • scrollRect: Scroll container that hosts dynamically generated slot entries.

    • slotPrefab: Prefab instantiated for each save slot.

    • panel, titleBackgroundPanel, titleSaveGameText: Optional references for the main panel and title elements

Theme

  • theme: A SaveSlotsRuntimeTheme asset; when assigned, ApplyTheme can replace colors, sprites, and text styling on the panel, title background, title text, and scroll background

    • Create a new Theme for the Save Slots Runtime UI:

      • Right-Click in your Project window --> Create/Crystal Save/UI/Create Save Slots Runtime Theme

    • Create new Theme for the Save Slot Entry UI:

      • Right-Click in your Project window --> Create/Crystal Save/UI/Create Save Slot Entry Theme

  • Feature Toggles

    • showScreenshots, showMetadata, showCustomMetadata, showRename, showLoad, showSave, showDelete: Per‑slot booleans that enable or disable screenshots, metadata fields, and various action buttons within each entry UI

Hidden Slots

  • hiddenSlots: Comma‑separated list of slot numbers to omit from this UI. Entries are still available to the save system but are not displayed. The string is parsed into a set for quick lookup via HiddenSlotNumbers

  • Sorting Options

    • sortAutoSaveFirst: Moves the designated Auto‑Save slot to the top of the list.

    • sortQuickSavesFirst: Moves Quick‑Save slots ahead of regular slots while preserving their relative order

  • Slot Naming

    • slotNameMetadataKey: When saving, this metadata key is checked to override the default slot name; an empty value falls back to the active scene name. The SlotNameMetadataKey property exposes it for other components

Last updated