---
description: by Fullscreen
---

# Mailbox (GC2)

The `RememberGC2Mailbox` component is a `SaveableComponent` that captures and restores the state of a Game Creator 2 `Mailbox` at runtime. On startup it verifies a `Mailbox` exists on the same GameObject and logs an error if it is missing

<figure><img src="https://166712561-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp47l4hoFKIHGBwL1Cm4D%2Fuploads%2FgE4RoShX3gTmMV1bNKoB%2Fimage.png?alt=media&#x26;token=98ce5824-a19f-4095-888b-89395423e2a5" alt=""><figcaption></figcaption></figure>



For saving, `SerializeComponentData` packages the mailbox’s letters and their metadata into a `MailboxDataSerialized` object and serializes it via `SaveDataSerializer`

When loading, `DeserializeComponentData` deserializes that blob and schedules a coroutine to apply the restored state only after the mailbox and its catalogue are ready, preventing races with automatic population

The `ApplyWhenMailboxReady` coroutine waits up to a defined frame limit, repeatedly attempting to rebuild the exact saved set of letters and verifying the mailbox contents remain stable; if the catalogue never becomes ready, it logs a warning and leaves the current state untouched to avoid wiping data.

Helper routines such as `IsMailboxMatchingSaved` and `ResolveLetterById` support this process by checking for consistency and mapping saved IDs to actual letters

The nested `MailboxDataSerialized` type stores letter IDs, read/hidden flags, received dates, and item claim statuses, with methods to populate from a mailbox and to reapply this state back into one

***

### Setup

1. **Add the Remember Component**
   * Select the character GameObject that owns **Mailbox**.
   * Add **Remember Component** (`RememberComposite`) via\
     `Add Component → Crystal Save/Remember Components/Remember Component`.
   * In the Remember Component’s list, add **Remember GC2 Mailbox**.
2. **Behind the scenes**
   * `RememberComposite` keeps a designer-controlled list of hidden `SaveableComponent` instances so their IDs persist across reloads
3. **Result**
   * A hidden `RememberGC2Mailbox` component is created and registered with the Save system, automatically bound to `Mailbox` thanks to `[RequireComponent]` and `[RememberTarget]` attributes.
4. Demo Scene
   * Mailbox Demo scene requires import of official Mailbox Demo Scene named Adventure. Import it via Game Creator 2's Install menu.

***

### Configuration Options

Remember GC2 Mailbox has no configuration Options

***

### Save/Load Flow

{% @mermaid/diagram content="graph TD
    UCC["Mailbox<br/>GameObject"]
    RC["Remember Component<br/>(RememberComposite)"]
    RUC["RememberGC2Mailbox"]
    Snapshot["Mailbox Snapshot"]
    SM["Crystal Save<br/>SaveManager"]

    UCC --> RC
    RC --> RUC
    RUC -->|serialize/deserialize| Snapshot
    Snapshot --> SM
" %}

1. **Serialization** – When a save occurs, the component builds a `MailboxSnapshot` with the enabled data and hands it to the SaveManager.
2. **Deserialization** – On load, the snapshot is restored, reapplying gear, location, camera view, input settings, and attributes.

***

### Summary

* Works with Fullscreen's Mailbox by default and requires `Mailbox`.component.
* Deployed via `RememberComposite` to maintain stable save IDs.
* There is no Mailbox-specific configuration.
