移植概述Porting overview

当涉及到迁移或升级现有项目以满足混合现实的需要时,移植旅程取决于你的应用程序是通过 Unity 还是 Unreal 引擎生成的,并面向 HoloLens (第一代) 或 HoloLens 2 或 SteamVR。When it comes to porting or upgrading your existing projects for Mixed Reality, your porting journey depends on whether your app is built with Unity or Unreal Engine, and targets HoloLens (1st Gen) or HoloLens 2, or SteamVR. 此概述页面包含我们针对每个平台和设备的当前建议-请务必检查,因为这些过程始终会更改。This overview page contains our current recommendations for each platform and device - be sure to check back as these processes are always changing.

首先,根据我们的 UnityUnreal 建议设置项目目标,然后执行一个或多个移植方案:First, set up your project target based on either our Unity and Unreal recommendations, then follow one or more of our porting scenarios:

无论你将应用程序移植到另一台目标设备,都要使你的项目保持最新状态,这一点很重要。It's important to keep your projects up to date, whether your porting an app to another target device. 有关我们当前的建议,请参阅下面列出的基于引擎的资源。Refer to the engine-based resources listed below for our current recommendations.

UnityUnity

我们当前对混合现实的 Unity 开发建议是 使用旧 XR 包的 unity 2019 LTSOur current recommendation for Unity development with Mixed Reality is Unity 2019 LTS using the Legacy XR package. 如果你的项目使用混合现实工具包,请仔细检查是否正在使用最新版本,即当前为 MRTK 2.5If your project uses the Mixed Reality Toolkit, double-check that you're on the latest version, which is currently MRTK-Unity 2.5.

注意

尽管此版本的 Unity 提供了 XR SDK,但 Azure 空间锚不与此安装程序兼容。While the XR SDK is available with this version of Unity, Azure Spatial Anchors is not currently compatible with this setup. 将使用适用于 Unity 的 Azure 空间定位包的未来版本更新此建议。This recommendation will be updated with a future release of the Azure Spatial Anchors package for Unity.

UnrealUnreal

我们当前对混合现实的 Unreal 开发建议是 Unreal 引擎 4.26Our current recommendation for Unreal development with Mixed Reality is Unreal Engine 4.26. 如果你的项目使用混合现实工具包 UX 工具,请确保使用最新版本,该版本目前为 UXT 0.10If your project uses the Mixed Reality Toolkit UX Tools, make sure you're using the latest version, which is currently UXT 0.10.

移植方案Porting scenarios

HoloLens (第一代) Unity 应用到 HoloLens 2HoloLens (1st Gen) Unity apps to HoloLens 2

如果你有一个现有的 HoloLens (第一代) Unity 应用程序,你想要将其移植到 HoloLens 2,请按照 HoloLens 移植一文中的说明进行操作。If you have an existing HoloLens (1st Gen) Unity application that you'd like to port over to a HoloLens 2, follow the instructions in our HoloLens porting article.

Windows Mixed Reality 头戴显示设备Windows Mixed Reality headsets

如果为其他设备(如 Oculus Rift 或 HP 回音 G2)生成了内容,则需要重定特定于供应商的 VR Sdk 和可能的输入映射 Api。If you've built content for other devices, such as the Oculus Rift or HP Reverb G2, you'll need to retarget vendor-specific VR SDKs and potentially input-mapping APIs. 可以在我们的 沉浸式应用移植指南中查找 Unity 和 Unreal 移植方案的相关信息。You can find information for both Unity and Unreal porting scenarios in our immersive apps porting guide.

SteamVR 应用程序SteamVR applications

对于要为 Windows Mixed Reality 耳机更新的任何 SteamVR 体验,请参阅我们的 SteamVR 更新指南For any SteamVR experiences that you want to update for Windows Mixed Reality headsets, refer to our SteamVR updating guide.

2D 通用 Windows 应用程序2D Universal Windows applications

如果你想要将现有的 2D UWP 应用程序移植到 Windows Mixed Reality 沉浸式耳机或 HoloLens,请遵循我们 的移植 2D uwp apps For Windows Mixed reality 说明。If you have an existing 2D UWP app that you'd like to port to either a Windows Mixed Reality immersive headset or HoloLens, follow our porting 2D UWP apps for Windows Mixed Reality instructions.