Oculus Go Development

On 6/23/20 Oculus announced plans to sunset Oculus Go. Information about dates and alternatives can be found in the Oculus Go introduction.

Oculus Quest Development

All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.

Cloud Storage 2

Note: You are viewing the Unreal version of this topic. To view this topic for Unity development, see Cloud Storage 2 (Unity). To view this topic for native development, see Cloud Storage 2 (Native).

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:

  • Save progress between app uses and installs. Users are able to uninstall and re-install without losing their saved data.
  • Share progress between devices. Users can sync data between devices.
  • Provide disaster recovery. User data can be restored if devices are lost or damaged, or if the local data is corrupted.

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).

Cloud Storage 2 Quick Reference

Following is a summary of the features and requirements for Cloud Storage 2:

  • Permissions: Because the default location is external storage, Android apps that use Cloud Storage v2 will require WRITE_EXTERNAL_STORAGE permissions. For more information, see the Permissions Overview and WRITE_EXTERNAL_STORAGE in the Android documentation.

    Note: On Android, the WRITE_EXTERNAL_STORAGE permission is no longer required as of version 19 of the Oculus software.

  • Conflict resolution: At app launch time, if there is a file conflict between the cloud and the local device, the user will be prompted to choose either the device data or the cloud data, or they can choose to cancel the application launch.
  • Path and Filename Limits: To be compatible with all platforms, you must limit the filename length to 260 characters, and file names to 255 characters.
  • File types: You can store any file type using cloud storage.
  • File number/size: You can synchronize 100 files, each up to 10 MB in size per app or app grouping.
  • Selective Syncing: You can optionally specify certain folders and/or files to sync. Selective sync file paths must start with a forward slash and can contain wildcard characters (*) in the directory or file name or file extension. Other special characters and some file names are not allowed. See Selective Sync for detailed requirements.
  • Get local storage location in code: Use the ovr_CloudStorage2_GetUserDirectoryPath() method to get the directory where files are saved on the user device.

Enable Clouds Saves in the Developer Dashboard

To use Cloud Storage v2, you must explicitly enable it in the developer dashboard.

  • Sign in to the Oculus developer portal, and go to https://dashboard.oculus.com.
  • Under Manage, find your app, or app grouping and navigate to Platform Services. Note that if you are enabling Cloud Storage v2 for an app grouping.
  • Select Cloud Storage.
  • On the Cloud Storage page, find Cloud Storage v2, check Enable Cloud Storage 2 and then Save.

The following image shows an example:

Cloud Storage 2 - Dashboard
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.

Selective Sync

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.

  • Enter a path. The path:
    • Must start with a forward slash.
    • Can contain one set of wildcard characters (**) in the directory name
    • Can contain multiple wildcard characters (*) for the file name and extension.
    • Can’t contain any other special characters (\ : ? “ < > | & ) or the path will be ignored.
    • Can’t be longer than 260 characters. An individual file name must not exceed 255 characters.

    For example, /scores/*.dat is a valid selective sync path.

  • Click Submit

To Modify or Delete a Selective Sync Path

You can easily modify or delete a selective sync path in the developer dashboard.

  • In the developer dashboard, find your app or app grouping and go to Cloud Storage.
  • On the Cloud Storage page, under Cloud Storage v2, find the path you want to modify in the Selective Sync table.
  • Click the ellipses (...) button in that row and select Edit or Delete
  • Click Submit after you finish editing the path or to confirm the deletion.

Access the Device Sync Location in Code

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.

  1. To, retrieve the device save location, call the ovr_CloudStorage2_GetUserDirectoryPath() method.

  2. Then, parse the result of this call using the Message_GetString method.

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.

Test Cloud Storage v2

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:

Testing Cloud Storage