[UnityAdPlugin] Guide on how to use this plugin

Forge Component
Published on 8 Feb by Oliver Ong Chor Yew
0 votes
Published on 8 Feb by Oliver Ong Chor Yew

Part 1 Initialization 

Put UnityAdsInit on On application Ready

Go To Unity ad website,sign up for an account if not done so.
Login and go to operate and then to projects,click on "new project"

Pardon me I had a test project already,it should be empty

Key in your project name and details,scroll down to click add project

Go to the project you just created and get the Game IDs that we going to use

Click the InitUnityads Action and fill up the GameIdAndroid with the value for Google Play Store and GameIdiOS with the value for Apple App Store 

Do not forget to fill up true for IsTest and IsDebug if you are testing before you release the app.set IsTest and IsDebug to false when releasing the app.


Do not click your own ads by setting isTest to true and watch actual ads,you will get banned for it

Publish and generate the app

Part 2 Unityad Event Listener

Put the UnityAd block to the page you want to have the listener or if you want the layout and create the Listener actions.

How can I make a rewarded video using the listener when the video completed to give user rewards


When the ad is completed,the placementID will be pass to the listener,you can use if statement to check whether the particular placementID is completed playing and based on that offer rewards

How do I show video ads not ready


When the Plugin has not initialized completed and the user tries to play an ad,especially rewarded ones,you can use this to inform the user ads are not ready yet

Part 3 Play Video

Go to Unity dashboard and get your placement ID

For Rewarded ads

Put the unity show ads on the button action that you desire to play the reward ads and set up the parameter accordingly

Lastly go to the listener and find the onVideoCompleted Event Handler and set up as previously shown on the part 2 of this tutorial

Non Rewarded Interstitial ads
You can use the same UnityShowAds action,but different placementId


Part 4 GetPlacementState

Use this to check whether the ad is ready,enabled and available especially if you want to use rewarded ads
Place This before the UnityShowAds and set the placementId to be the same as the placementId of the UnityShowAds

GetPlacementState output values

For PlacementState:






Check for placement state READY to allow video playback,you can implement other if statement to check for other placement state and inform the user accordingly


Error in interstitial video

Instead of putting the desired action after the UnityShowAd action
Use the OnVideoCompletedEvent and OnVideoSkippedEvent to bring user to desired page or the desired action
Use the placementID just like rewarded video

Sample to show how all things are done using the plugin both Interstitial and rewarded


Hello Oliver,

I was looking for a way to integrate an augmented reality App built in Unity into an Outsystems App.

Will this plugin be able to help?


Gonçalo Almeida wrote:

Hello Oliver,

I was looking for a way to integrate an augmented reality App built in Unity into an Outsystems App.

Will this plugin be able to help?


This plugin is only for unity ad integrations not for augmented reality app integration
Sorry about it