Skip to content

Rewarded

Rewarded ads allow players to watch a full video ad in exchange for in-game rewards — such as coins, bonuses, or additional lives.
Unlike interstitials, rewarded ads require explicit user consent to view and always grant a reward upon successful completion.

Rewarded ads must be loaded in advance before being shown.
Once a rewarded has been displayed, it must be loaded again before it can be shown the next time.


Load Rewarded

This function loads a rewarded ad using the provided Ad Unit ID.
It must always be called before attempting to show the ad — if no rewarded ad is loaded, calling Show Rewarded will fail immediately.

Parameters

1. Ad Unit ID

Your Rewarded Ad Unit ID from the AdMob console.


2. On Loaded

Called when the rewarded ad has been successfully loaded and is ready to show.


3. On Load Failed

Called if the ad fails to load due to network issues, invalid configuration, or SDK errors.
This callback returns an EAdErrorCode value and an error message for debugging.


Show Rewarded

Displays a previously loaded rewarded ad and grants the user a reward after it finishes successfully.
Before calling this function, make sure that a rewarded ad has already been loaded using Load Rewarded.

Parameters

1. Auto Reload

If enabled, the system will automatically load a new rewarded ad immediately after the current one is shown and completed.
Useful for games with frequent reward opportunities.


2. Is Immersive

Enables immersive mode during the ad display — hiding system UI elements (navigation bar, status bar) for a more seamless user experience.


3. On Started

Called when the rewarded ad starts displaying.


4. On Completed

Called after the ad is fully closed by the user or finishes naturally.


5. On Reward Earned

Triggered when the player successfully earns a reward by watching the ad to completion.
Use this callback to grant in-game currency, bonuses, or other benefits.


6. On Failure

Called if the ad fails to show (for example, if it wasn’t properly loaded or was invalidated).
This callback returns an EAdErrorCode value and an error message for debugging.


7. On Event

Triggered on intermediate ad lifecycle updates — such as when is clicked.
Returns an EFullScreenAdEventType describing the event.


Is Rewarded Ready

Checks whether a rewarded ad has been successfully loaded and is ready to be shown.
Use this before calling Show Rewarded to avoid triggering a failed display event.

Return Value

Returns true if a rewarded ad is successfully loaded and ready to display.
Returns false if no ad is currently loaded.


C++ Usage

All rewarded-related Blueprint functions are also available in C++.
You can directly manage rewarded ad loading, showing, and reward handling through the static methods of UAdMobCPPLibrary.

LoadRewarded

#include "AdMobCPPLibrary.h"

void UMyClass::LoadRewarded()
{
    FOnRewardedLoadedNative OnLoaded;
    OnLoaded.BindLambda([]()
    {
        UE_LOG(LogTemp, Log, TEXT("Rewarded ad loaded successfully."));
    });

    FOnRewardedLoadFailedNative OnLoadFailed;
    OnLoadFailed.BindLambda([](EAdErrorCode Error, const FString& Message)
    {
        UE_LOG(LogTemp, Error, TEXT("Failed to load rewarded ad: %s (Code: %d)"), *Message, static_cast<int32>(Error));
    });

    UAdMobCPPLibrary::LoadRewarded(TEXT("ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxx"), OnLoaded, OnLoadFailed);
}

ShowRewarded

#include "AdMobCPPLibrary.h"

void UMyClass::ShowRewarded()
{
    FOnRewardedStartedNative OnStarted;
    OnStarted.BindLambda([]()
    {
        UE_LOG(LogTemp, Log, TEXT("Rewarded ad started."));
    });

    FOnRewardedCompletedNative OnCompleted;
    OnCompleted.BindLambda([]()
    {
        UE_LOG(LogTemp, Log, TEXT("Rewarded ad completed."));
    });

    FOnRewardEarnedNative OnRewardEarned;
    OnRewardEarned.BindLambda([](int32 Amount, const FString& Type)
    {
        UE_LOG(LogTemp, Log, TEXT("Reward earned: %d %s"), Amount, *Type);
    });

    FOnRewardedShowFailedNative OnFailure;
    OnFailure.BindLambda([](EAdErrorCode Error, const FString& Message)
    {
        UE_LOG(LogTemp, Error, TEXT("Failed to show rewarded ad: %s (Code: %d)"), *Message, static_cast<int32>(Error));
    });

    FOnRewardedEventNative OnEvent;
    OnEvent.BindLambda([](EFullScreenAdEventType Event)
    {
        UE_LOG(LogTemp, Log, TEXT("Rewarded ad event: %d"), static_cast<int32>(Event));
    });

    UAdMobCPPLibrary::ShowRewarded(true, false, OnStarted, OnCompleted, OnRewardEarned, OnFailure, OnEvent);
}

IsRewardedReady

#include "AdMobCPPLibrary.h"

void UMyClass::CheckRewardedStatus()
{
    bool bIsReady = UAdMobCPPLibrary::IsRewardedReady();

    UE_LOG(LogTemp, Log, TEXT("Is rewarded ad ready? %s"), bIsReady ? TEXT("Yes") : TEXT("No"));
}