HomeGamesMusicContact

How To Add In-Game Ads (Ad Mob Android) Unreal Engine 4

How To Add In-Game Ads (Ad Mob Android) Unreal Engine 4. How to add banner and interstitial ads to your Android mobile game.



In-game advertisements enable you to display ads to players of your game on mobile platforms. This provides a means of monetizing your game while allowing it to remain completely free to the player.

Ad Mob Android Configuration

First, register for an Ad Mob account, add your game, create banner and/or interstitial ads for your game. Next, open your Unreal Engine 4 project and go to Edit > Project Settings > Platforms > Android > in the section Google Play Services, check the Enable Google Play Support, enter the App ID for your game, add an element to the Ad Mob Ad Unit IDs and enter your Google Play License Key, all of these values are available in the Google Ad Mob interface, you can also find them in the Google Play Developer Console.

Go to Edit > Project Settings > Platforms > Android > Advanced APKPackaging section > add com.android.vending.BILLING to the Extra Permissions array.

How to show an Ad Banner - Blueprint scripting

You can show an ad banner in your game at the top or at the bottom of the screen. The Show Ad Banner node is used to display an ad banner in your game, call it somewhere in the logic where you want to show an ad. The Hide Ad Banner node hides the visible ad banner, call it when you no longer want the ad to be displayed.

How to show an Interstitial Ad - Blueprint scripting

There are four nodes that you need to use if you want to show Interstitial Ads in your game, the nodes work in pairs: Load Interstitial Ad - Is Interstitial Ad Request, Is Interstitial Ad Available - Show Interstitial Ad.

At the begin of the play, add an Load Interstitial Ad node, drag of it to add an Is Interstitial Ad Request node, connect the string with a Branch node, the True pin of the Branch node connect it with a Set Boolean variable node, named Interstitial Add, the False pin of the Branch node connect it with a Delay node of 0.2, the Delay connect it in a loop with the Load Interstitial Ad node.

After that at the end of the play or where you want to show ad, add an Is Interstitial Ad Available node, connect it with a Branch node, the True pin of the Branch node connect it with a Show Interstitial Ad node, the False pin of the Branch node connect it with a Set Boolean variable node, named User is Offline. That is all.

Edvog on the internet

YoutubeSpotifyAmazon MusicApple MusicGoogle Play MusicGoogle Play

Comments