Stay organized with collections
Save and categorize content based on your preferences.
Starting from Google Mobile Ads (GMA) SDK version 21.0.0, you can enable
optimized SDK initialization and ad loading to improve the overall
responsiveness of ads and help prevent "Application Not Responding"
(ANR) errors on your app.
This guide outlines the changes you need to make to enable these optimizations.
Google Mobile Ads Unity plugin version 7.2.0 or higher.
Update your Google Mobile Ads settings
There are two optimization flags available within the Google Mobile Ads
settings scriptable object: Optimize Initialization and Optimize
AdLoading. Once they're turned on, the initialization and ad loading tasks
that require extended processing time are offloaded to background threads.
Setting
Behavior
Optimize Initialization
Optimizes the MobileAds.initialize() initialization call.
Optimize AdLoading
Optimizes ad load calls for all ad formats.
You can access the Google Mobile Ads settings through the Unity asset menu:
Assets > Google Mobile Ads > Settings
Once selected, the settings UI appears in your Unity Editor inspector window.
Note that you can turn on one or both options in the same app.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[[["Starting with Google Mobile Ads SDK version 21.0.0, you can optimize SDK initialization and ad loading to enhance ad responsiveness and mitigate ANR errors."],["This optimization is achieved through two flags within the Google Mobile Ads settings: \"Optimize Initialization\" and \"Optimize AdLoading\", which offload time-consuming tasks to background threads."],["To enable these optimizations, you need to update your Google Mobile Ads Unity plugin to version 7.2.0 or higher and adjust the settings via the Unity asset menu (Assets \u003e Google Mobile Ads \u003e Settings)."],["By default, both optimization flags are set to `false`, allowing you to selectively enable them based on your app's needs."]]],[]]