GoogleMobileAds. Api. MobileAds
Contains logic that applies to the Google Mobile Ads SDK as a whole.
Summary
Properties |
|
---|---|
Instance
|
static MobileAds
The
MobileAds static instance. |
RaiseAdEventsOnUnityMainThread
|
static bool
Determines whether ad events raised by the Google Mobile Ads Unity plugin should be invoked on the Unity main thread.
|
Public static functions |
|
---|---|
DisableMediationInitialization()
|
void
Call before MobileAds.Initialize(Action{InitializationStatus}) to disable mediation adapter initialization.
|
DisableSDKCrashReporting()
|
void
Disables automated SDK crash reporting on iOS.
|
GetRequestConfiguration()
|
Gets the global RequestConfiguration.
|
Initialize(Action< InitializationStatus > initCompleteAction)
|
void
Initializes the Google Mobile Ads SDK.
|
OpenAdInspector(Action< AdInspectorError > adInspectorClosedAction)
|
void
Opens ad inspector UI.
|
SetApplicationMuted(bool muted)
|
void
Sets whether the app's audio is muted.
|
SetApplicationVolume(float volume)
|
void
Sets the app's audio volume.
|
SetRequestConfiguration(RequestConfiguration requestConfiguration)
|
void
Sets the global RequestConfiguration that is used for every AdRequest during the app's session.
|
SetiOSAppPauseOnBackground(bool pause)
|
void
Indicates if the Unity app should be paused when a full-screen ad is displayed.
|
Classes |
|
---|---|
GoogleMobileAds. |
Contains methods for returning the device scale and safe width. |
Properties
RaiseAdEventsOnUnityMainThread
static bool RaiseAdEventsOnUnityMainThread
Determines whether ad events raised by the Google Mobile Ads Unity plugin should be invoked on the Unity main thread.
The default value is false.
Public static functions
DisableMediationInitialization
void DisableMediationInitialization()
Call before MobileAds.Initialize(Action{InitializationStatus}) to disable mediation adapter initialization.
Warning: Calling this method might negatively impact your mediation performance. This method should only be called if you include mediation adapters in your app, but you don't plan on using Google mediation during this app session (for example, you are running an A/B test).
DisableSDKCrashReporting
void DisableSDKCrashReporting()
Disables automated SDK crash reporting on iOS.
Call this method closer to the app start.
GetRequestConfiguration
RequestConfiguration GetRequestConfiguration()
Gets the global RequestConfiguration.
Details | |
---|---|
Returns |
The global configuration that is used for every AdRequest.
|
Initialize
void Initialize( Action< InitializationStatus > initCompleteAction )
Initializes the Google Mobile Ads SDK.
Call this method before loading an ad and before interacting with the rest of the Google Mobile Ads SDK.
Details | |||
---|---|---|---|
Parameters |
|
OpenAdInspector
void OpenAdInspector( Action< AdInspectorError > adInspectorClosedAction )
Opens ad inspector UI.
Details | |||
---|---|---|---|
Parameters |
|
SetApplicationMuted
void SetApplicationMuted( bool muted )
Sets whether the app's audio is muted.
Affects initial mute state for all ads.
Warning: Muting your app reduces video ad eligibility and might reduce your app's ad revenue. Use this API only if your app provides a custom mute control and reflects the user's mute decision through the API.
Details | |||
---|---|---|---|
Parameters |
|
SetApplicationVolume
void SetApplicationVolume( float volume )
Sets the app's audio volume.
Affects audio volumes of all ads relative to other audio output.
Warning: Lowering your app's audio volume reduces video ad eligibility and might reduce your app's ad revenue. Use this API only if your app provides custom volume control and reflects the user's volume choice through the API.
Details | |||
---|---|---|---|
Parameters |
|
SetRequestConfiguration
void SetRequestConfiguration( RequestConfiguration requestConfiguration )
Sets the global RequestConfiguration that is used for every AdRequest during the app's session.
Details | |||
---|---|---|---|
Parameters |
|
SetiOSAppPauseOnBackground
void SetiOSAppPauseOnBackground( bool pause )
Indicates if the Unity app should be paused when a full-screen ad is displayed.
On Android, Unity is paused when displaying full-screen ads. Calling this method with true
duplicates this behavior on iOS.
Details | |||
---|---|---|---|
Parameters |
|