Mailbox (GC2)

by Fullscreen

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

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

  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.

Last updated