Downloadable Content and Language Packs for Rift Apps

You can provide asset files for your Rift apps. The files can be:

  • Downloadable content (DLC) for free or for purchase. Rift apps can provide downloadable content (DLC) as generic asset files. This DLC can be free or made available as in-app purchases (IAP). Generic asset files can be almost any format.
  • Language packs also for free or for purchase. These are special type of asset file that enable localization on demand.

Both of these file types enable you to provide new experiences, characters, levels, and languages for your app without increasing the initial download size.

Downloadable Content (DLC)

Downloadable content can be provided as generic asset files in any format. The user downloads this content at app runtime. This content can be free or for purchase.

If you plan to make your in-app content available for purchase, you need to define the items as in-app purchases (IAP) before you upload the files to the Oculus store. This requires you to upload a file that contains SKU, name, description, currency, price and item type for each IAP item in tab-separated format. See the Commerce (IAP) page for information about defining an in-app purchase. You will need to associate each dynamic asset with a IAP item in the upload process that follows.

Language Packs

When you provide language packs as downloadable assets, you not only decrease initial download size, but you can enable language selection to occur in the Oculus app instead of in your app. The Oculus app will provide a language picker on the Details page of your app, populated with languages based on the language packs you provide. The following image shows an example of how this looks.

For Oculus to correctly recognize your language pack you should name it with a language code per BCP47 format, with a suffix of “lang”. For example en-us.lang and de.lang would be valid language pack names.

Game Engine Support

Unity and Unreal offer packaging features that are compatible with the generic assets in the Oculus platform. For Unity, you package the content as AssetBundles, and for Unreal you chunk the package. For more information, see:

Upload a Binary with DLC or Language Packs to the Oculus Store

To upload a binary with DLC or language packs, you must use the Oculus Platform Command Line Utility. with the upload-rift-build command. To upload asset files, use one of the following parameters.

  • For DLC asset files, use the –assets_dir parameter to specify the directory that contains the assets for upload.

  • For language packs, use the –language_packs_dir parameter to specify the directory that contains the language packs.

For example, for an app that has both DLC and language packs, you would use a command like the following:

ovr-platform-util upload-rift-build -a --app_id 12345 -s 1234 --d path/to/mygame.zip --assets_dir /path/to/myGame/assets --language_packs_dir /path/to/myGame/language-packs --c ALPHA

  • If you are providing content for purchase, you must associate your DLC with the IAP items that you previously defined. Note that each SKU must resolve to a SKU you defined on the Dashboard in the previous section. You do this with JSON in the format:

[{ "filename": "DLC-file-name.ext", "sku": "IAP-sku" }, { "filename": "DLC-file-name.ext", "sku": "IAP-sku" }]

  • Use the –asset_file_iap_configs_file parameter and provide the path to a file containing the JSON definitions. For example:

ovr-platform-util upload-rift-build -a --app_id 12345 -s 1234 --d path/to/mygame.zip --assets_dir /path/to/myGame/assets --language_packs_dir /path/to/myGame/language-packs --asset_file_iap_configs_file /path/to/iap-config-file.json -c ALPHA

View Items in the Dashboard

Once you successfully upload your items, you can view and manage them on the developer dashboard. Navigate to https://dashboard.oculus.com/. On the left menu, select Manage Builds, and select your app. Then find the Expansion Files column for the build you just uploaded and then select View Expansion Files. The different kinds of assets will display:

  • Asset Files (DLC) - Runtime downloadable content that you offer for free
  • Language Packs - Language packs that you provide for free or for purchase. Build Expansion Files page. The following image shows an example.

Add Support for DLC and Language Packs in Code

You can access DLC and language packs using platform APIs.

Get the DLC in Your App Code

Use the following steps when you want to enable users to initiate a download in-app, whether the content is free or purchased. Follow these steps to install an expansion file at a certain point in your app. For example, the first two levels of a game ship in the app package, but the 3rd and 4th levels can be downloaded when the user progesses that far in the game.

  1. Call ovr_AssetFile_GetList to retrieve a list of available expansion files. The array returned contains an array of items. Each item contains:
    • A file name,
    • An ID
    • A status, iap_status, which is one of the following values: free, entitled, or not-entitled
    • A download status, download_status, which is one of the following values:
      • installed meaning that user has installed the file
      • available meaning that user can download the file
      • in-progress meaning the file is being downloaded or is installing for that user.
  2. (Purchasable DLC Only) Use the Commerce (IAP) APIs to allow the user to complete the purchase flow. Call ovr_IAP_LaunchCheckoutFlow with the SKU you defined.
  3. Call ovr_AssetFile_DownloadById() to initiate the download, passing the file name of the DLC you defined at upload.
  4. You’ll receive a DownloadResult response with the path to the asset as a confirmation that the request was successful. You should also listen for DownloadUpdate notifications which return info about transferred bytes, and a complete flag that notifies you when the download is complete.

Check for Language Packs in Your App Code

Use the following steps to check for language packs in your app code.

  1. Use the ovr_AssetFile_GetList function described in the previous section to get a list of all assets.
  2. Check for an asset type with the GetAssetType function defined on an asset. A language pack will be of type language_pack.
  3. Use the ovr_AssetDetails.GetLanguage function to get the language of the asset.