Muokkaa

Jaa


Install the Remote Rendering package for Unity

Azure Remote Rendering uses a Unity package to encapsulate the integration into Unity. This package contains the entire C# API and all plugin binaries required to use Azure Remote Rendering with Unity. Following Unity's naming scheme for packages, the package is called com.microsoft.azure.remote-rendering.

The package isn't part of the ARR samples repository, and it isn't available from Unity's internal package registry. You can choose one of the following options to install the Unity package.

Install Remote Rendering package using the Mixed Reality Feature Tool

The Mixed Reality Feature Tool (download) integrates Mixed Reality feature packages into Unity projects.

To add the package to a project, you need to:

  1. Download the Mixed Reality Feature Tool
  2. Follow the full instructions on how to use the tool.
  3. On the Discover Features page, tick the box for the Microsoft Azure Remote Rendering package under Azure Mixed Reality Services and select the version of the package you wish to add to your project
  4. If you want to use OpenXR, also add the Mixed Reality OpenXR Plugin package under Azure Mixed Reality Services in the same way.

Mixed_Reality_feature_tool_package

To update your local package, just select a newer version from the Mixed Reality Feature Tool and install it. Updating the package may occasionally lead to console errors. If you see errors in the console, try closing and reopening the project.

Install Remote Rendering package manually

To install the Remote Rendering package manually, you need to:

  1. Download the package from the Mixed Reality Packages npm feed at https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/Unity-packages/npm/registry.

    • You can either use npm and run the following command to download the package to the current folder.

      npm pack com.microsoft.azure.remote-rendering --registry https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/Unity-packages/npm/registry
      

      If you want to use OpenXR, run the following command to download the platform support package to the current folder.

      npm pack com.microsoft.mixedreality.openxr --registry https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/Unity-packages/npm/registry
      
    • Or you can use the PowerShell script at Scripts/DownloadUnityPackages.ps1 from the azure-remote-rendering GitHub repository.

      • Edit the contents of Scripts/unity_sample_dependencies.json to

        {
          "packages": [
            {
              "name": "com.microsoft.azure.remote-rendering", 
              "version": "latest", 
              "registry": "https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/Unity-packages/npm/registry"
            }
          ]
        }
        

        If you want to use OpenXR, you also need the platform support package. Edit the contents of Scripts/unity_sample_dependencies.json to

        {
          "packages": [
            {
              "name": "com.microsoft.azure.remote-rendering", 
              "version": "latest", 
              "registry": "https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/Unity-packages/npm/registry"
            },
            {
              "name": "com.microsoft.mixedreality.openxr", 
              "version": "latest", 
              "registry": "https://pkgs.dev.azure.com/aipmr/MixedReality-Unity-Packages/_packaging/Unity-packages/npm/registry"
            }
          ]
        }
        
      • Run the following command in PowerShell to download the package to the provided destination directory.

        DownloadUnityPackages.ps1 -DownloadDestDir <destination directory>
        
  2. Install the downloaded package(s) with Unity's Package Manager.

To update a local package, just repeat the respective download steps you used and reimport the package. Updating the package may occasionally lead to console errors. If you see errors in the console, try closing and reopening the project.

Unity render pipelines

Supported Unity render pipelines are documented in this dedicated article: Unity Render Pipelines

Next steps