ARCore 会连接到 ARCore API 云端点,以托管和解析云锚点,从而实现这些共享体验。这需要有有效的互联网连接。
下图简要介绍了托管和解析的工作原理:
用户在其环境中创建本地锚点。
锚点由系统托管 - ARCore 会将该本地锚点的数据上传到 ARCore API 云端点,该端点会返回该锚点的唯一 ID。
应用会将该唯一 ID 分发给其他用户。
锚点已解析 - 设备具有唯一 ID 的用户可以使用 ARCore Cloud Anchor API 重新创建相同的锚点。
托管
为了建立和托管锚点,ARCore 会使用该锚点周围空间的 3D 地图特征。为了获取此特征图,设备的后置摄像头必须在主机调用之前从不同的视角和位置映射感兴趣中心及其周围的环境。然后,ARCore Cloud Anchor API 会创建相应空间的 3D 地图特征,并将唯一的 Cloud Anchor ID 返回给设备。
正在解决
当同一环境中的其他用户将其设备的摄像头对准托管 Cloud Anchor 的位置时,解析请求会导致 ARCore Cloud Anchor API 定期将场景中的视觉特征与创建的 3D 地图特征进行比较。ARCore 使用这些比较来精确定位用户相对于云锚点的位置、方向和姿势。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eARCore enables AR experiences within Android Instant Apps, allowing users to engage without prior installation.\u003c/p\u003e\n"],["\u003cp\u003eUnlike regular apps, AR-enabled Instant Apps require explicit checks and installation prompts for Google Play Services for AR.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers need to be mindful of the size constraints imposed on Instant Apps, with the ARCore SDK contributing to the limit.\u003c/p\u003e\n"],["\u003cp\u003eCreating an instant-enabled app bundle is the starting point for integrating ARCore with Instant Apps.\u003c/p\u003e\n"]]],[],null,["# Cloud Anchors allow different users to share AR experiences\n\n**Platform-specific guides** \n\n### Android (Kotlin/Java)\n\n- [Quickstart](/ar/develop/java/cloud-anchors/quickstart)\n- [Developer guide](/ar/develop/java/cloud-anchors/developer-guide)\n\n### Android NDK (C)\n\n- [Developer guide](/ar/develop/c/cloud-anchors/developer-guide)\n\n### Unity (AR Foundation)\n\n- [Developer guide](/ar/develop/unity-arf/cloud-anchors/developer-guide)\n\n### iOS\n\n- [Quickstart](/ar/develop/ios/cloud-anchors/quickstart)\n- [Developer guide](/ar/develop/ios/cloud-anchors/developer-guide)\n\n### Unreal Engine\n\n- [ARCore SDK for Unreal Engine (official documentation)](https://docs.unrealengine.com/5.0/en-US/developing-for-arcore-in-unreal-engine/)\n\nA **Cloud Anchor** is a special type of [anchor](/ar/develop/anchors) that can be used to persist AR experiences in the real world. With the **ARCore Cloud Anchor API** , or **ARCore Cloud Anchor service**, you can create interactive layers of digital information and anchor them to actual locations, designing experiences that can be shared over time by multiple people across many different devices. Cloud Anchors connect real world locations with digital content that anyone can access from compatible mobile devices. Both Android and iOS users can participate in the same experience and return to them again and again, even weeks or months later.\n\nAnchors and Cloud Anchors\n-------------------------\n\nCloud Anchors are anchors that are hosted on the [ARCore API](https://console.cloud.google.com/apis/library/arcore) cloud endpoint. This hosting enables users to share experiences in the same app. The basic guidelines for anchors also apply to Cloud Anchors.\n\nUse cases for developing with the ARCore Cloud Anchor API\n---------------------------------------------------------\n\nThe ARCore Cloud Anchor API can help persist AR experiences in the real world and create shared experiences between users. The following are some ways you can use it in your own projects.\n\n### Persist AR experiences in the real world\n\nCloud Anchors enable one user to place an AR object in the physical environment and another to see the same object at the same place at a later time. For example, use Cloud Anchors to create virtual signs in front of stores, leave virtual notes on their kitchen countertops for their friends, or redecorate their bedrooms with virtual posters. In general, Cloud Anchors are best used for room-scale AR experiences.\n\n### Real-time collaborative experiences\n\nCloud Anchors also enable real-time collaboration between users. For example, users can play a virtual game of ping-pong on the coffee table, or paint a virtual mural together with their community.\n\nDevice compatibility\n--------------------\n\nThe ARCore Cloud Anchor API works on all ARCore [supported devices](/ar/devices).\n\nHow Cloud Anchors work\n----------------------\n\nARCore connects to the [ARCore API](https://console.cloud.google.com/apis/library/arcore) cloud endpoint to host and resolve Cloud Anchors, thereby enabling these shared experiences. This requires a working Internet connection.\n\nHere's a high-level picture of how hosting and resolving works:\n\n1. The user creates a local anchor in their environment.\n2. The anchor is **hosted** --- ARCore uploads that local anchor's data to the ARCore API cloud endpoint, and the endpoint returns a unique ID for that anchor.\n3. The app distributes that unique ID to other users.\n4. The anchor is **resolved** --- Users whose devices have the unique ID can recreate the same anchor using the ARCore Cloud Anchor API.\n\n### Hosting\n\nYour browser does not support the video tag.\n\nTo establish and host an anchor, ARCore uses a 3D feature map of the space surrounding that anchor. To obtain this feature map, the device's rear camera must map the environment in and around the center of interest from different viewing angles and positions before the host call. The ARCore Cloud Anchor API then creates a 3D feature map of the space, and returns a unique Cloud Anchor ID to the device.\n\n### Resolving\n\nYour browser does not support the video tag.\n\nWhen another user in the same environment points their device's camera at the area where the Cloud Anchor was hosted, a resolve request causes the ARCore Cloud Anchor API to periodically compare visual features from the scene against the 3D feature map that was created. ARCore uses these comparisons to pinpoint the user's position, orientation, and pose relative to the Cloud Anchor.\n\n### API deprecation policy\n\nSee [ARCore Cloud Anchor API deprecation policy](/ar/develop/cloud-anchors/cloud-anchor-deprecation-policy)\nfor details."]]