使用 Unity 的 AR Foundation 通过 Vulkan 渲染 AR 应用
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在 Unity 的 AR Foundation 上,ARCore 支持 Vulkan 渲染。请按照本指南中的说明在 Unity 项目中启用 Vulkan Graphics API。
安装正确版本的 Unity 软件包
必须具有以下软件包版本才能使用 Vulkan 图形 API 进行渲染。在 Window > Package Manager 中,确保已安装以下软件包及其对应的版本:
- AR Foundation 6.1.0-pre.2 或更高版本
- Google ARCore XR 插件 6.1.0-pre.2 或更高版本
如需在 Unity 项目中启用 Vulkan 图形 API,请按以下步骤操作:
- 依次选择 Edit > Project Settings > Other > Rendering > Graphics API,然后添加 Vulkan API 选项。
- Vulkan 渲染需要 Android API 级别 29 或更高级别。在 Unity 中,依次选择修改 > 项目设置 > 其他 > 标识 >,将最低 API 级别设置为 API 级别 29 或更高级别。
- 如需将 Vulkan Graphics API 与通用渲染流水线搭配使用,请找到有效的通用渲染程序资产。在项目素材资源中,使用搜索过滤条件
t:UniversalRenderPipelineAsset
。在其 Inspector 中,将 ARCommandBufferSupportRendererFeature
添加到 Renderer 功能列表中。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-14。
[null,null,["最后更新时间 (UTC):2025-07-14。"],[],[],null,["# Render your AR app using Vulkan with Unity's AR Foundation\n\nVulkan Rendering is supported with ARCore on Unity's AR Foundation. Follow this\nguide to enable the Vulkan Graphics API in your Unity project.\n\nInstall the correct version of Unity packages\n---------------------------------------------\n\nThe following package versions are required to use the Vulkan Graphics API for\nrendering. In **Window \\\u003e Package Manager**, ensure that the following\npackages and their corresponding versions are installed:\n\n1. [AR Foundation](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@6.1/manual) **6.1.0-pre.2 or later**\n2. [Google ARCore XR Plugin](https://docs.unity3d.com/Packages/com.unity.xr.arcore@6.1/manual) **6.1.0-pre.2 or later**\n\nConfigure your project\n----------------------\n\nTo enable the Vulkan Graphics API in your Unity Project, follow these steps:\n\n1. In **Edit \\\u003e Project Settings \\\u003e Other \\\u003e Rendering \\\u003e Graphics API** , add the **Vulkan** API option.\n2. Vulkan Rendering requires Android API Level 29 or higher. In Unity, go to **Edit \\\u003e Project Settings \\\u003e Other \\\u003e Identification \\\u003e** , set the **Minimum API** to API level 29 or higher.\n3. To use the Vulkan Graphics API with the Universal Render Pipeline, locate your active Universal Renderer asset. In your Project assets, use the search filter `t:UniversalRenderPipelineAsset`. In its Inspector, add an `ARCommandBufferSupportRendererFeature` to the list of Renderer Features."]]