Version: 2022.1
Unity VR project template
XR API 参考

Unity AR project template

Unity’s AR project template provides a starting point for augmented reality development in Unity. The template pre-installs the right packages needed for AR development, and the Scene hierarchy is pre-configured for AR.

Unity directly supports the following AR platforms:

For more information on how to start developing apps for these platforms in Unity, refer to their documentation in the list above.

This project template uses AR Foundation, Unity’s framework for multiplatform AR development. For more information on how to get started with AR Foundation and add AR features to your Project, refer to the:

Using the AR project template

To use the AR project template, follow these steps:

  1. Install Unity 2019 LTS and make sure you add the right build targets for each platform you plan to deploy to. See the Supported build targets table on this page for more information.
  2. From the Unity Hub, click the dropdown next to New and create a new project in Unity 2019.4 LTS.
  3. Select the AR template and name your Project.
  4. Click Create.
  5. After your Project has been created, from Unity’s main menu, go to Edit > Project Settings > XR Plug-in Management, and select the platforms you plan to deploy to.
  6. Make sure rendering and quality settings are optimized for your target platform. See the Rendering and quality settings table on this page.
  7. For information on how to add AR features to your Project, see the AR Foundation package documentation.

Supported build targets

设备 Player type 插件提供商
ARCore 设备 Android ARCore
ARKit 设备 iOS ARKit
HoloLens UWP Windows Mixed Reality
Magic Leap One Lumin Magic Leap

Rendering and quality settings

平台 图形 API 立体渲染模式
ARCore 设备 OpenGL ES 3.0
ARKit 设备 Metal
HoloLens DX11 单通道实例化
Magic Leap One OpenGL ES 3.2 单通道实例化

Removing the example Assets

If you want to completely remove the example Assets from your Project, follow these steps:

  1. In the Project window, open the Assets folder.
  2. Right-click the ExampleAssets folder.
  3. Click Delete.
  4. In the pop-up that appears, click Delete.
  5. Make sure to remove the disconnected script from the ARSessionOrigin GameObject.
Unity VR project template
XR API 参考