Overlay sul rendimento ARCore
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
ARCore può visualizzare un riquadro overlay con le statistiche sulle prestazioni di un'app, ad esempio
Utilizzo di CPU e memoria, che fornisce una panoramica in tempo reale delle risorse di sistema.

Per attivare l'overlay sul rendimento, procedi nel seguente modo.
Apri l'esperienza AR nella tua app in modo che ci sia una sessione ARCore attiva
in esecuzione. L'app deve essere in modalità AR per ricevere la trasmissione che consente
l'overlay. Le immagini di anteprima della fotocamera AR devono essere visibili sul dispositivo
schermo.
Utilizza il seguente comando di broadcast di Activity Manager per abilitare
overlay sul rendimento per la tua app.
# 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
Potresti essere indirizzato al menu Settings per concedere il pacchetto ARCore
l'autorizzazione a disegnare overlay. Questo passaggio deve essere eseguito una sola volta. Trova
Google Play Services for AR e imposta l'opzione di attivazione/disattivazione delle autorizzazioni su Allowed
prima di tornare all'app.
Se hai attivato l'overlay sul rendimento senza concedere ad ARCore
l'autorizzazione a disegnare overlay, verrai indirizzato al menu Impostazioni
all'avvio di una nuova sessione ARCore da parte dell'app. In questo caso, devi
concedere l'autorizzazione ARCore o disattivare l'overlay sul rendimento.
Per disattivare l'overlay sul rendimento:
Apri l'esperienza AR nella tua app in modo che ci sia una sessione ARCore attiva
in esecuzione. La tua app deve essere in modalità AR per ricevere la trasmissione che disattiva
l'overlay. Le immagini di anteprima della fotocamera AR devono essere visibili sul dispositivo
schermo.
Utilizza il seguente comando di trasmissione di Activity Manager per disabilitare
overlay sul rendimento per la tua app.
# 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
Puoi anche disattivare l'overlay del rendimento toccando il pulsante di chiusura
sull'overlay e che si cancellano
le preferenze condivise di Android dell'app. Un modo per farlo è cancellare
e i dati di Google Cloud.
Interpretazione dei valori di utilizzo della CPU
Il campo Process CPU Usage mostra la quantità di tempo di CPU impiegato
processo di richiesta di partecipazione attualmente viene utilizzata come percentuale del totale del dispositivo
di tempo di CPU disponibile. Questo valore include carichi di lavoro delle applicazioni, carichi di lavoro ARCore,
ed eventuali altre librerie utilizzate dalla tua app. Ad esempio, il campo mostrerà
Utilizzo della CPU del 25% se il processo dell'applicazione satura completamente un singolo core della CPU quando
in esecuzione su un dispositivo quad-core.
L'overlay prestazioni fornisce anche un'analisi dettagliata dell'utilizzo della CPU per singoli
Funzionalità di ARCore. Queste suddivisioni sono espresse anche come percentuale del
tempo di CPU totale disponibile del dispositivo. I carichi di lavoro sono:
L'overlay non mostra le funzioni disattivate o che utilizzano meno di
0,1% di tempo di CPU.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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."]]