User Data
Store and manage player data to enhance gameplay experience and retain progress.
There are two types of storage: local (local_storage) and internal (platform_internal). When writing to local storage, data is saved on the player's device. When writing to internal storage, data is saved on the platform's servers.
If you need to call storage methods in a sequence, make sure you wait for previous call to finish, so there is no potential data collisions.
Use TYPE_ARRAY parameters for batch operations.
Default Storage Type
Identify the default storage type to understand where data is being saved (local or server).
Bridge.storage.default_typeUsed automatically if no specific storage type is specified when working with data. Possible values: local_storage, platform_internal.
Support Check
Verify if the specified storage type is supported on the platform to ensure compatibility.
Bridge.storage.is_supported("local_storage")
Bridge.storage.is_supported("platform_internal")
# To use constants for convenience:
Bridge.storage.is_supported(Bridge.StorageType.LOCAL_STORAGE)
Bridge.storage.is_supported(Bridge.StorageType.PLATFORM_INTERNAL)Availability Check
Check if the specified storage type is currently available for use to manage data storage effectively.
Load Data
Load DataRetrieve stored data based on a key or multiple keys to restore player progress or settings.
Save Data
Save DataSave data to the specified storage with a key to retain player progress or settings.
Delete Data
Remove data from the specified storage by key to manage player data and settings effectively.
If no specific storage type is passed as the third argument when working with data, the default storage type Bridge.storage.default_type is used.
Last updated