升级到 AR Foundation 版本 6
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
适用于 Unity 的 AR Foundation 的 ARCore Extensions 支持 AR Foundation 的所有版本 4、版本 5 和版本 6。如需将现有的 AR 项目从 AR Foundation 5.x 升级到 AR Foundation 6.x,请按以下步骤操作:
由于对 TrackedPoseDriver
的依赖,AR Foundation 6.x 仍然需要 Input System 软件包。ARCore Extensions 示例场景需要旧版输入模块。
如需同时支持输入系统软件包和旧版输入管理器,请在 Project Settings > Player > Other Settings 中将 Active Input Handling 设置为 Both。
更新或移除 Unity 的 AR Foundation 中已废弃和已更改的 API
6.1 版有哪些新变化
在 Player Settings > Player > Other Settings > Application Entry Point 中,检查 Activity 是否已勾选,以及 GameActivity 是否已取消勾选
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eARCore Extensions for Unity's AR Foundation supports AR Foundation versions 4, 5, and 6.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading to AR Foundation 6.x requires addressing Input System package dependencies and potentially adjusting Active Input Handling to "Both" for compatibility.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need to update or remove deprecated APIs and ensure specific settings within the Player Settings are configured correctly for the upgrade.\u003c/p\u003e\n"]]],[],null,["# Upgrade to AR Foundation version 6\n\nARCore Extensions for Unity's AR Foundation supports all\n[version 4](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/index.html)\nand\n[version 5](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@5.1/manual/index.html)\nand\n[version 6](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@6.1/manual/index.html)\nof AR Foundation. To upgrade your existing AR project to AR Foundation 6.x from\nAR Foundation 5.x, follow these steps:\n\n1. AR Foundation 6.x continues to requires the [Input System package](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.11/manual/index.html)\n due to a dependency on [`TrackedPoseDriver`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@6.1/changelog/CHANGELOG.html#500-pre6---2021-11-17).\n The ARCore Extensions Sample Scenes require the legacy input module.\n\n To support both the Input System package and the older Input Manager,\n in **Project Settings \\\u003e Player \\\u003e Other Settings** set **Active Input\n Handling** to **Both**.\n2. Update or remove, deprecated and changed APIs from Unity's AR Foundation\n [What's new in version 6.1](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@6.1/manual/whats-new.html)\n\n3. In **Player Settings \\\u003e Player \\\u003e Other Settings \\\u003e Application Entry Point** ,\n check **Activity** is **Checked** and **GameActivity** is **Unchecked**"]]