Asset Files, DLC, and Language Packs for Rift Apps

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

  • Generic Asset Files, which can be downloadable content (DLC) offered for fee or for purchase and available at runtime, or required assets files. Required asset files are downloaded at app install time.
  • 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.

These files are uploaded to the Oculus store when you upload your app package.

Generic Asset Files and DLC

Generic asset files and downloadable content (DLC) can be any format, with any file extension. You can specify whether the content is required, and therefore downloads automatically at app install time, or if you intitiate the download at runtime as the user moves through your app. DLC can be free or made available as in-app purchases (IAP).

If the asset is required, you include a config file during the app upload process that marks the item as required.

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 Asset Files 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 12345 -s 1234 -d path/to/mygame.zip --assets_dir /path/to/myGame/assets --language_packs_dir /path/to/myGame/language-packs -c ALPHA

  • For required files or files associated with in-app purchases, use the --asset_files_config parameter and include a path to the JSON configuration file that specifies the required items.

    For example:

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

    The JSON configuration file contains entries to associate your DLC with the IAP items that you previously defined, or identify an item as required. Note that each SKU must resolve to a SKU you defined on the Dashboard in the previous section.

    For example:

     {
      "asset1.ext": {
          "required": true
      },
      "DLC-file-name.ext": {
          "sku": "IAP-sku"
      }
     }
    

Note: The asset_files_config replaces the asset_file_iap_config, which is limited to specifying IAP SKUs.

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 and DLC - Assets that you offer for free or for purchase. Yes in the Required column indicates the file downloads at app installation time.
  • Language Packs - Language packs that you provide for free or for purchase.

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.