Cloud Storage Examples
This section demonstrates common and practical usage of Firebase Cloud Storage in Unreal Engine projects. Cloud Storage is typically used to upload, download, and manage user-related files such as save data, screenshots, or other generated content.
All Cloud Storage operations are asynchronous and provide progress, success, and failure callbacks.
All examples below are shown using Blueprint nodes. Firebase is assumed to be already initialized.
Uploading a File
Uploading a local file is the most common Cloud Storage use case. This is typically used for saving player data, backups, screenshots, or other user-generated files.
In this example, a local save file is uploaded to Cloud Storage.
LocalPathspecifies the file location on the deviceRemotePathspecifies the path inside the Cloud Storage bucket- folders in
RemotePathare created automatically
The progress callback can be used to update UI elements such as progress bars.
Downloading a File
Downloading a file allows you to retrieve previously uploaded content and store it locally for use in the game.
In this example, a save file is downloaded from Cloud Storage back to the local device.
Once the download completes successfully, the file can be loaded and used immediately.
Uploading and Downloading Raw Bytes
Cloud Storage also supports working directly with raw byte data, without using a local file on disk.
This is useful when:
- data is generated at runtime
- files are temporary
- content is serialized in memory
Uploading Bytes
Use Upload Bytes to send raw data directly to Cloud Storage.
Downloading Bytes
Use Download Bytes to retrieve raw data from Cloud Storage and process it in memory.
This approach avoids filesystem access and is suitable for small to medium-sized data.
Deleting a File
Files stored in Cloud Storage can be deleted when they are no longer needed.
In this example, a previously uploaded save file is removed.
Deleting unused files helps keep storage usage under control.
Getting a Download URL
Cloud Storage can generate a public download URL for a file. This URL can be used to share content or load files externally.
In this example, a download URL is requested for a stored file.
The generated URL can be used to:
- share files externally
- load images or assets via HTTP
- integrate with external services
Summary
Firebase Cloud Storage provides a flexible way to store and retrieve files associated with your application and users.
By using file uploads, downloads, raw byte operations, deletion, and download URLs, you can cover most common storage scenarios without additional backend infrastructure.