AdMob Functions (API)
This section documents all public functions exposed by the PloxTools: Google AdMob plugin.
These functions are available in both Blueprint and C++ through UAdMobBlueprintLibrary and UAdMobCPPLibrary. They are used to initialize AdMob, manage consent and privacy, load and display ads, query ad state, and configure automatic App Open behavior.
The Blueprint and C++ interfaces expose the same functionality. Blueprint functions use dynamic delegates, while the C++ interface uses the corresponding native delegate types with the Native suffix.
Initialization
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Initialize AdMob | OnCompleted (FOnAdMobInitialized) |
Callback: OnCompleted |
Initializes the Google Mobile Ads SDK. Call this once before loading ads. |
| Is AdMob Ready | - | bool |
Returns true if the Google Mobile Ads SDK has completed initialization. |
Consent & Privacy
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Request Consent | bUnderAgeOfConsent (bool), OnCompleted (FOnConsentRequestCompleted), OnFailure (FOnConsentRequestFailed) |
Callback: OnCompleted (ConsentStatus: EConsentStatus)Callback: OnFailure (ErrorCode: EFormErrorCode, ErrorMessage: FString) |
Updates the current UMP consent information and displays a consent form if required. bUnderAgeOfConsent must be configured by the application when the setting applies to the current user. |
| Show Privacy Options Form | OnCompleted (FOnPrivacyOptionsFormCompleted), OnFailure (FOnPrivacyOptionsFormFailed) |
Callback: OnCompleted (ConsentStatus: EConsentStatus)Callback: OnFailure (ErrorCode: EFormErrorCode, ErrorMessage: FString) |
Displays the UMP privacy options form so the user can review or change previously selected privacy choices. |
| Can Request Ads | - | bool |
Returns whether the current UMP privacy state allows the application to proceed with AdMob initialization and ad requests. |
| Get Consent Status | - | EConsentStatus |
Returns the current consent status reported by Google UMP. |
| Get Privacy Options Requirement Status | - | EPrivacyOptionsRequirementStatus |
Returns whether the application should provide a user-accessible entry point to the privacy options form. |
| Set Age Restricted Treatment | Treatment (EAgeRestrictedTreatment) |
- | Sets the age-related treatment applied globally to subsequent Google Mobile Ads requests. Call this before initializing AdMob. |
| Reset Consent State | - | - | Resets the stored UMP consent state for development and testing. This function should not be used as a production privacy settings option. |
Banner
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Load Banner | AdUnitID (FString), BannerAdSize (EBannerAdSize), OnLoaded (FOnBannerLoaded), OnLoadFailed (FOnBannerLoadFailed), OnEvent (FOnBannerEvent) |
Callback: OnLoadedCallback: OnLoadFailed (ResponseCode: EAdErrorCode, ErrorMessage: FString)Callback: OnEvent (BannerEventType: EBannerAdEventType) |
Creates and loads a banner using the specified Ad Unit ID and banner size. Banner lifecycle events continue to be reported through OnEvent. |
| Show Banner | BannerGravity (EBannerGravity), OffsetX (int32), OffsetY (int32), OnSuccess (FOnBannerShown), OnFailure (FOnBannerShowFailed) |
Callback: OnSuccessCallback: OnFailure (ResponseCode: EAdErrorCode, ErrorMessage: FString) |
Displays the loaded banner at the selected screen position with optional horizontal and vertical offsets. |
| Hide Banner | - | - | Hides the current banner without destroying the loaded banner instance. |
| Destroy Banner | - | - | Removes and destroys the current banner instance. A new banner must be loaded before it can be shown again. |
| Is Banner Ready | - | bool |
Returns true if a banner is loaded and available to show. |
| Is Banner Visible | - | bool |
Returns true if the current banner is visible on screen. |
Interstitial
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Load Interstitial | AdUnitID (FString), OnLoaded (FOnInterstitialLoaded), OnLoadFailed (FOnInterstitialLoadFailed) |
Callback: OnLoadedCallback: OnLoadFailed (ResponseCode: EAdErrorCode, ErrorMessage: FString) |
Loads an interstitial using the specified Ad Unit ID. |
| Show Interstitial | bAutoReload (bool), bIsImmersive (bool), OnStarted (FOnInterstitialStarted), OnCompleted (FOnInterstitialCompleted), OnFailure (FOnInterstitialShowFailed), OnEvent (FOnInterstitialEvent) |
Callback: OnStartedCallback: OnCompletedCallback: OnFailure (ResponseCode: EAdErrorCode, ErrorMessage: FString)Callback: OnEvent (FullScreenAdEventType: EFullScreenAdEventType) |
Displays the loaded interstitial. bAutoReload loads another ad with the previous Ad Unit ID after the current ad closes. bIsImmersive enables immersive fullscreen presentation where supported. |
| Is Interstitial Ready | - | bool |
Returns true if an interstitial is loaded and ready to display. |
Rewarded
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Load Rewarded | AdUnitID (FString), OnLoaded (FOnRewardedLoaded), OnLoadFailed (FOnRewardedLoadFailed) |
Callback: OnLoadedCallback: OnLoadFailed (ResponseCode: EAdErrorCode, ErrorMessage: FString) |
Loads a rewarded ad using the specified Ad Unit ID. |
| Show Rewarded | bAutoReload (bool), bIsImmersive (bool), OnStarted (FOnRewardedStarted), OnCompleted (FOnRewardedCompleted), OnRewardEarned (FOnRewardEarned), OnFailure (FOnRewardedShowFailed), OnEvent (FOnRewardedEvent) |
Callback: OnStartedCallback: OnCompletedCallback: OnRewardEarned (Amount: int32, RewardType: FString)Callback: OnFailure (ResponseCode: EAdErrorCode, ErrorMessage: FString)Callback: OnEvent (FullScreenAdEventType: EFullScreenAdEventType) |
Displays the loaded rewarded ad. bAutoReload loads another ad with the previous Ad Unit ID after the current ad closes. Grant the gameplay reward from OnRewardEarned, using the returned amount and reward type when required. |
| Is Rewarded Ready | - | bool |
Returns true if a rewarded ad is loaded and ready to display. |
Rewarded Interstitial
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Load Rewarded Interstitial | AdUnitID (FString), OnLoaded (FOnRewardedInterstitialLoaded), OnLoadFailed (FOnRewardedInterstitialLoadFailed) |
Callback: OnLoadedCallback: OnLoadFailed (ResponseCode: EAdErrorCode, ErrorMessage: FString) |
Loads a rewarded interstitial using the specified Ad Unit ID. |
| Show Rewarded Interstitial | bAutoReload (bool), bIsImmersive (bool), OnStarted (FOnRewardedInterstitialStarted), OnCompleted (FOnRewardedInterstitialCompleted), OnRewardEarned (FOnInterstitialRewardEarned), OnFailure (FOnRewardedInterstitialShowFailed), OnEvent (FOnRewardedInterstitialEvent) |
Callback: OnStartedCallback: OnCompletedCallback: OnRewardEarned (Amount: int32, RewardType: FString)Callback: OnFailure (ResponseCode: EAdErrorCode, ErrorMessage: FString)Callback: OnEvent (FullScreenAdEventType: EFullScreenAdEventType) |
Displays the loaded rewarded interstitial. bAutoReload loads another ad with the previous Ad Unit ID after the current ad closes. Grant the gameplay reward from OnRewardEarned. |
| Is Rewarded Interstitial Ready | - | bool |
Returns true if a rewarded interstitial is loaded and ready to display. |
App Open
| Function | Parameters | Return / Callback | Description |
|---|---|---|---|
| Load App Open | AdUnitID (FString), OnLoaded (FOnAppOpenLoaded), OnLoadFailed (FOnAppOpenLoadFailed) |
Callback: OnLoadedCallback: OnLoadFailed (ResponseCode: EAdErrorCode, ErrorMessage: FString) |
Loads an App Open ad using the specified Ad Unit ID. |
| Show App Open | bAutoReload (bool), bIsImmersive (bool), OnStarted (FOnAppOpenStarted), OnCompleted (FOnAppOpenCompleted), OnFailure (FOnAppOpenShowFailed), OnEvent (FOnAppOpenEvent) |
Callback: OnStartedCallback: OnCompletedCallback: OnFailure (ResponseCode: EAdErrorCode, ErrorMessage: FString)Callback: OnEvent (FullScreenAdEventType: EFullScreenAdEventType) |
Displays the loaded App Open ad. bAutoReload loads another ad with the previous Ad Unit ID after the current ad closes. bIsImmersive enables immersive fullscreen presentation where supported. |
| Is App Open Ready | - | bool |
Returns true if an App Open ad is loaded and ready to display. |
| Enable Auto Show App Open | AdUnitID (FString), MinimumIntervalSeconds (int32) |
- | Enables automatic App Open ad loading and display when the application returns to the foreground. MinimumIntervalSeconds defines the minimum time between automatic displays. |
| Disable Auto Show App Open | - | - | Disables automatic App Open ad loading and display. |