On this Page
Cloud Storage v2 enables you to save, synchronize, and load data between devices and installs from your Oculus apps. When you enable Cloud Storage v2, a local default directory is synchronized to/from the cloud at app startup and exit for each app or app grouping. You can also choose to selectively synchronize files or directories relative to the default location by specifying Selective Sync paths.
Cloud Storage 2 supports the following use-cases, and more:
Cloud Storage 2 replaces the cloud storage feature that was supported only for Rift apps. If you need docs for this legacy feature, see Cloud Storage (legacy).
Following is a summary of the features and requirements for Cloud Storage 2:
WRITE_EXTERNAL_STORAGEpermissions. For more information, see the Permissions Overview and WRITE_EXTERNAL_STORAGE in the Android documentation.
ovr_CloudStorage2_GetUserDirectoryPath()method to get the directory where files are saved on the user device.
To use Cloud Storage v2, you must explicitly enable it in the developer dashboard.
The following image shows an example:
Now, files will be synced to the cloud from the default directory on the user device.
Note that for platform compatibility reasons, files with the following names will not sync to the cloud: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT0. For more information, see Windows Desktop - Naming a File.
You can optionally synchronize a subset of files or directories relative to the default directory by configuring selective sync paths.
To configure a path
Under Selective Sync, click Add new path.
Note: If you don’t see the option to configure a sync location, make sure you saved after enabling the Cloud Storage v2 option.
/scores/*.dat is a valid selective sync path.
To Modify or Delete a Selective Sync Path
You can easily modify or delete a selective sync path in the developer dashboard.
Once you have enabled cloud storage, the default device directory or selective sync files/directory will automatically be synced when the user starts or exits your app.
To, retrieve the device save location, call the
Then, parse the result of this call using the
This will return a string that indicates the default storage location for that user on that device. Selective sync paths will be relative to this directory. Use this path to write or retrieve local data that is synced with cloud storage.
You must correctly exit the app for files to sync to the cloud correctly. When you develop Oculus mobile apps using Unity, make sure to use the OVRManager.PlatformUIConfirmQuit method to quit the app.
The Cloud File List section of the Cloud Saves page in the developer dashboard enables you to test cloud saves when you run apps associated with your developer account. Files that are synchronizing when you run your app will appear in the section. If they don’t appear as expected, you may have an issue with the path you specified. The following image shows an example: