การวางซ้อนประสิทธิภาพของ ARCore
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ARCore สามารถแสดงแผงวางซ้อนพร้อมกับสถิติประสิทธิภาพของแอป เช่น
การใช้งาน CPU และหน่วยความจำ ทำให้เห็นภาพรวมของทรัพยากรระบบแบบเรียลไทม์

ทำตามขั้นตอนต่อไปนี้เพื่อเปิดใช้การวางซ้อนประสิทธิภาพ
เปิดประสบการณ์ AR ในแอปเพื่อให้มีเซสชัน ARCore อยู่
วิ่งอยู่ แอปต้องอยู่ในโหมด AR เพื่อรับประกาศที่เปิดใช้
ที่วางซ้อน รูปภาพตัวอย่างของกล้อง AR ควรมองเห็นได้ในอุปกรณ์
บนหน้าจอ
ใช้คำสั่งการออกอากาศเครื่องมือจัดการกิจกรรมต่อไปนี้เพื่อเปิดใช้
การวางซ้อนประสิทธิภาพ
ของแอป
# 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 ใหม่ ในกรณีนี้ คุณควรทำอย่างใดอย่างหนึ่งต่อไปนี้
ให้สิทธิ์แก่ ARCore หรือปิดใช้การวางซ้อนประสิทธิภาพ
ทำตามขั้นตอนต่อไปนี้เพื่อปิดใช้การวางซ้อนประสิทธิภาพ
เปิดประสบการณ์ AR ในแอปเพื่อให้มีเซสชัน ARCore อยู่
วิ่งอยู่ แอปต้องอยู่ในโหมด AR จึงจะได้รับการออกอากาศที่ปิดใช้
ที่วางซ้อน รูปภาพตัวอย่างของกล้อง AR ควรมองเห็นได้ในอุปกรณ์
บนหน้าจอ
ใช้คำสั่งการออกอากาศเครื่องมือจัดการกิจกรรมต่อไปนี้เพื่อปิดใช้งาน
การวางซ้อนประสิทธิภาพ
ของแอป
# 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 ที่พร็อพเพอร์ตี้
ปัจจุบันกระบวนการสมัครเป็นเปอร์เซ็นต์ของยอดรวมของอุปกรณ์
เวลา CPU ที่พร้อมใช้งาน ค่านี้รวมถึงภาระงานของแอปพลิเคชัน, ภาระงาน ARCore
และไลบรารีอื่นๆ ที่แอปของคุณใช้ ตัวอย่างเช่น ฟิลด์นี้จะแสดง
ใช้งาน CPU 25% หากกระบวนการของแอปพลิเคชันทำให้ CPU แกนเดียวเต็มอิ่มเมื่อ
บนอุปกรณ์แบบ Quad Core
การวางซ้อนประสิทธิภาพยังแจกแจงรายละเอียดการใช้งาน CPU ของผู้ใช้แต่ละคน
ฟีเจอร์ของ ARCore รายละเอียดเหล่านี้ยังแสดงเป็นเปอร์เซ็นต์ของ
เวลา CPU ที่ใช้ได้ทั้งหมดของอุปกรณ์ ภาระงานมีดังนี้
โฆษณาซ้อนทับไม่แสดงคุณลักษณะใดๆ ที่ถูกปิดใช้งานหรือใช้งานน้อยกว่า
เวลา CPU 0.1%
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\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."]]