ARCore 性能叠加层
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
ARCore 可以显示叠加面板,其中包含应用的性能统计信息,如
CPU 和内存使用情况,提供系统资源的实时概览。

请按照以下步骤启用性能叠加层。
在您的应用中打开 AR 体验,以便有一个进行中的 ARCore 会话
。您的应用必须在 AR 模式下才能接收启用 AR 功能的广播
叠加层。AR 相机预览图片应该在设备上可见
屏幕。
使用以下 activity 管理器广播命令来启用
性能叠加层
# Enables ARCore's performance overlay and saves a setting to your app's
# Android Shared Preferences, so that the overlay remains enabled in
# subsequent ARCore sessions.
# Your app must have an actively running ARCore session to receive the broadcast.
adb shell am broadcast -a com.google.ar.core.ENABLE_PERFORMANCE_OVERLAY
系统可能会将您定向到 Settings 菜单,以便您向 ARCore 软件包授予许可
绘制叠加层的权限。此步骤只需执行一次。查找
Google Play Services for AR,并将权限切换开关设置为 Allowed
然后再返回您的应用
如果您在未授予 ARCore 的情况下启用了性能叠加层
绘制叠加层的权限时,您每次都会定向到“设置”菜单
。在这种情况下,您应该
授予 ARCore 权限,或停用性能叠加层。
如需停用性能叠加层,请按以下步骤操作。
在您的应用中打开 AR 体验,以便存在进行中的 ARCore 会话
。您的应用必须在 AR 模式下才能接收会停用 AR 功能的广播
叠加层。AR 相机预览图片应该在设备上可见
屏幕。
使用以下 activity 管理器广播命令停用
性能叠加层
# Disables ARCore's performance overlay and saves a setting to your app's
# Android Shared Preferences, so that the overlay remains disabled in
# subsequent ARCore sessions.
# Your app must have an actively running ARCore session to receive the broadcast.
adb shell am broadcast -a com.google.ar.core.DISABLE_PERFORMANCE_OVERLAY
您还可以通过点按“关闭”按钮来停用性能叠加层
叠加层和清除上的
应用的 Android 共享偏好设置一种方法是清除应用的
数据。
解读 CPU 使用率值
Process CPU Usage 字段显示
目前,申请流程占用的设备总数所占的百分比
可用的 CPU 时间。此值包括应用工作负载、ARCore 工作负载、
以及您的应用使用的任何其他库例如,该字段会显示
如果应用进程在 25% 的 CPU 利用率完全饱和时,
在四核设备上运行
性能叠加层还提供各个用户的 CPU 使用率细分数据,
ARCore 功能。这些细分数据还会用
设备的可用 CPU 总时间工作负载包括:
叠加层不会显示任何已停用或
0.1% CPU 时间。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eARCore offers a performance overlay that displays real-time CPU and memory usage statistics for your app during AR experiences.\u003c/p\u003e\n"],["\u003cp\u003eTo enable or disable the overlay, use specific ADB commands while your app is actively running in AR mode.\u003c/p\u003e\n"],["\u003cp\u003eThe overlay requires permission to draw overlays, which can be granted in the device's settings for "Google Play Services for AR".\u003c/p\u003e\n"],["\u003cp\u003eCPU usage is shown as a percentage of total device CPU, including both app and ARCore processes, and further broken down by specific ARCore features like motion tracking and plane detection.\u003c/p\u003e\n"]]],[],null,["# ARCore performance overlay\n\nARCore can display an overlay panel with an app's performance statistics such as\nCPU and memory usage, providing a real-time overview of system resources.\n\nEnable the performance overlay\n------------------------------\n\nFollow these steps to enable the performance overlay.\n\n1. Open the AR experience in your app so that there is an active ARCore session\n running. **Your app must be in AR mode to receive the broadcast that enables\n the overlay.** The AR camera preview images should be visible on the device\n screen.\n\n2. Use the following activity manager broadcast command to enable the\n performance overlay for your app.\n\n # Enables ARCore's performance overlay and saves a setting to your app's\n # Android Shared Preferences, so that the overlay remains enabled in\n # subsequent ARCore sessions.\n\n # Your app must have an actively running ARCore session to receive the broadcast.\n adb shell am broadcast -a com.google.ar.core.ENABLE_PERFORMANCE_OVERLAY\n\n3. You may be directed to the **Settings** menu to grant the ARCore package\n permission to draw overlays. This step only needs to be performed once. Find\n **Google Play Services for AR** and set the permissions toggle to **Allowed**\n before navigating back to your app.\n\n If you have enabled the performance overlay without granting ARCore\n permission to draw overlays, you will be directed to the Settings menu each\n time the app begins a new ARCore session. In this case, you should either\n grant ARCore permission, or disable the performance overlay.\n\nDisable the performance overlay\n-------------------------------\n\nFollow these steps to disable the performance overlay.\n\n1. Open the AR experience in your app so that there is an active ARCore session\n running. **Your app must be in AR mode to receive the broadcast that disables\n the overlay.** The AR camera preview images should be visible on the device\n screen.\n\n2. Use the following activity manager broadcast command to disable the\n performance overlay for your app.\n\n # Disables ARCore's performance overlay and saves a setting to your app's\n # Android Shared Preferences, so that the overlay remains disabled in\n # subsequent ARCore sessions.\n\n # Your app must have an actively running ARCore session to receive the broadcast.\n adb shell am broadcast -a com.google.ar.core.DISABLE_PERFORMANCE_OVERLAY\n\nYou can also disable the performance overlay by tapping the close button\non the overlay and clearing\nyour app's Android Shared Preferences. One way to do this is to clear your app's\ndata.\n\nInterpreting CPU usage values\n-----------------------------\n\nThe **Process CPU Usage** field displays the amount of CPU time that the\napplication process currently uses as a percentage of the device's total\navailable CPU time. This value includes application workloads, ARCore workloads,\nand any other libraries that your app uses. For example, the field would display\n25% CPU usage if the application process fully saturates a single CPU core when\nrunning on a quad-core device.\n\nThe performance overlay also provides a CPU usage breakdown for individual\nARCore features. These breakdowns are also expressed as a percentage of the\ndevice's total available CPU time. The workloads are:\n\n- [Motion Tracking](/ar/discover/concepts#motion_tracking)\n- [Plane Detection](/ar/discover/concepts#environmental_understanding)\n\nThe overlay does not display any features that are disabled or using less than\n0.1% CPU time."]]