[UnityAdPlugin] Guide on how to use this plugin

Forge Component
(0)
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.

WARNING

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

Example

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

Example

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

Example


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:

NO_FILL

DISABLED

WAITING

NOT_AVAILABLE

READY

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

Example


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

https://www.outsystems.com/forge/component-versions/5284

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?


regards

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?


regards

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


Hello Oliver,

Do you have any idea how can I integrate an unity app  for augmented reality in Outsystems?

I´ve try many ways and all of them go down...


Thanks

João Alves wrote:

Hello Oliver,

Do you have any idea how can I integrate an unity app  for augmented reality in Outsystems?

I´ve try many ways and all of them go down...


Thanks


I think you need a create a cordova plugin of the unity augmented reality first,then integrate it with outsystems.
Try designing a custom plugin using cordova then integrate it with outsystems

Guide on how to create plugin via cordova from scratch

https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/

Plugin integration with outsystems

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/Mobile_Plugins/Using_Cordova_Plugins

This unityads are actually open source plugin on github and I integrated them with outsystem

You can do the same with creation of custom plugin with unity once you managed to design and create a custom plugin