Unity Cloud Save
Enable Unity Cloud Save with one click in the Crystal Save Settings

Unity Cloud Save in Crystal Save
Crystal Save integrates seamlessly with Unity Cloud Save, allowing you to store game saves reliably in the cloud. This guide explains how to enable and configure Unity Cloud Save with Crystal Save.
Enabling Unity Cloud Save
Follow these steps to integrate Unity Cloud Save with Crystal Save:
Install Required Packages:
Open Window ▸ Package Manager in Unity.
Install Unity's Cloud Save and Authentication packages.
Configure Crystal Save:
Navigate to Tools ▸ Crystal Save ▸ Settings ▸ Crystal Save Settings in the Unity Editor.
In the Cloud Save Settings section:
Enable the option Enable Cloud Save.
Ensure Save Backend is set to UnityCloudSave.
Adjust Additional Options:
Review and adjust the Cloud Save options detailed below according to your needs.
Cloud Save Settings Explained
Here is a detailed explanation of each setting:
Default Auth Provider
Select the authentication method your game will use to sign in players automatically:
Anonymous (default) – No login credentials; simplest setup.
Unity – Unity account login.
UsernamePassword – User-defined email/password authentication.
GooglePlay, Apple, Facebook, Steam – Platform-specific providers.
Tip: You can manually handle authentication using Crystal Save's built-in authentication event relay (
AuthEventsRelay
) for greater control and flexibility.
Cloud Save Transport
Determines how data is uploaded to Unity Cloud Save:
Binary (recommended) – Stores data as
.sav
binary files using the Files API. (Best performance and smallest file size.)JSON – Stores data using the Data.Player API as Base64 encoded JSON strings.
Keep Local Mirror
Keeps a local copy of the save data on disk even when Cloud Save is enabled.
Enabled – Data will exist both locally and in the cloud (recommended).
Disabled – Cloud-only saves. Saves won't exist locally, requiring internet connectivity to load.
Important: Local mirrors are strongly recommended to ensure players can still load their data even if offline or if cloud storage becomes unavailable.
Upload Screenshots & Metadata
Stores additional save information alongside save files in Unity Cloud Save, such as:
Screenshots of the saved game state.
Metadata (e.g., last active scene, player stats).
Enabled – Recommended for better user experience, especially when presenting saves to players.
Disabled – Only raw save data is uploaded.
Note: Ensure
enableScreenshots
in SaveSettings is enabled to utilize this feature fully.
Auto-Login Unity Cloud Save
Automatically signs in the player when your game starts.
Enabled – Crystal Save automatically initiates sign-in on game startup (Best for Anonymous Login).
Disabled – You must manually initiate sign-in (useful if you have your own login UI).
Save Backend
Determines the service that Crystal Save uses for saving data:
UnityCloudSave (default) – Uses Unity's Cloud Save services.
Supabase – Targets an external Supabase bucket (advanced users only).
Advanced Cloud Save Setup
Crystal Save handles advanced features like compression and encryption effortlessly, providing optimal security and performance for your save files in the cloud.
Encryption & Compression (Optional)
In the Crystal Save Settings
under Cryptography Settings, you have two additional options to secure your cloud saves:
Enable Encryption (AES-256-GCM) – Recommended for maximum security.
Enable Compression (Gzip) – Recommended for reducing save file size, with a slight CPU usage trade-off.
Using Cloud Save with Screenshots
Crystal Save supports capturing and storing screenshots with each save:
Enable Upload Screenshots & Metadata in Cloud Save settings.
Enable enableScreenshots in general settings.
Screenshots will automatically upload and synchronize with Unity Cloud Save.
Verifying and Managing Cloud Saves
Remote Slot Management
Crystal Save can retrieve and merge your cloud saves automatically with local saves when players sign in:
Crystal Save automatically refreshes remote slots upon sign-in, ensuring your local saves match your cloud saves (current rule = last save wins. This will change in version 1.6).
Use Crystal Save’s built-in events and the provided UI helpers to keep players informed.
Code Integration & APIs
Crystal Save exposes multiple helpful APIs for advanced control, such as manual refresh of cloud slots or custom login methods.
Manual Refresh of Cloud Slots
await SaveManager.Instance.CloudSaveService.RefreshRemoteSlotsAsync();
This updates local slot listings with cloud data without a full reload, ideal for manual refresh buttons..
Manual Login (Username & Password Example)
bool success = await SaveManager.Instance.CloudSaveService
.SignInUsernamePasswordAsync("user@example.com", "password123");
You can also manually invoke these methods in your own login UIs.
Troubleshooting
Cloud Save Enabled, but Not Signed In?
Ensure
Auto-Login Unity Cloud Save
is enabled or handle login manually.Verify that authentication packages and Cloud Save packages are correctly installed.
Saves Not Uploading?
Check Unity Services status and player authentication status via the
AuthEventsRelay
component logs.
Encrypted Saves Inaccessible?
Ensure your encryption key (configured via the
masterSecretProvider
) hasn't changed. Losing the encryption key permanently locks your saves.
Final Tips
Use
Keep Local Mirror
to ensure offline play and resilience against network issues.Utilize encryption and compression for secure, efficient cloud saves.
Enable automatic slot metadata and screenshot uploads to enhance player experience.
Crystal Save's tight integration with Unity Cloud Save makes secure and efficient cloud saving simple for game designers and developers alike.
For further help, visit the Crystal Save discord or refer to other Crystal Save documentation provided.
Last updated