AdinPlay Unity Plugin

by [email protected]

Detail this plugin from Adinplay: Original Link

AdinPlay v1.0

Download Now

With the AdinPlay Unity plugin you can display AdinPlay banner- and video advertisements in your Unity
projects. The plugin can be easily imported, and advertisements can be displayed with UI buttons or
programmatically.
Please be aware that, at this time AdinPlay advertisement do not work in Unity FullScreen Mode.

Import the AdinPlay Unity package
Import the package from Assets/Import Package/Custom
Package…
Unity will analyze the package and display everything that will
be imported. Keep everything selected and click on Import.
After the import is completed, a new folder named Adinplay is
added in the Assets folder.
Setup and configure
Be sure you’re in the main scene of your project before
continuing to the next step.
Go to Window/Adinplay to open the AdinPlay Editor Tools.
Click on Setup and configure in the tools window. This will
configure the AdinPlay plugin in your project and add the required resources to your scene.
After configuration is completed the tools window will update. The
Tag URL input field will appear.
Past your own tag url in the field. This tag will be provided by AdinPlay
and have the following structure:
Api.adinplay.com/libs/aiptag/pub/xxx/xxxxx/tag.min.js

Showing video advertisements
Video advertisements are some of the most performant advertisements in monetization techniques. If
you already configured AdinPlay in your Unity project you can display video advertisements using a Unity
UI Button or programmatically.
Using a UI Button
Create a UI Button with GameObject/UI/Button. Select the button in the scene and open the inspector if
it was not open yet. Go Button (script) and add a On Click () action.
Select the AdinPlay object and click on No function/Adinplay/StartPreRoll()
Programmatically
You can show a video advertisement with a single line of code in C#.
Adinplay.instance.StartPreRoll();
Always be sure to call the AdinPlay instance after AdinPlay has loaded. This can be done by pointing
Adinplay.OnLoad to a function like this
public class AdinplayExampleBehaviour : MonoBehaviour {
void Awake()
{
Adinplay.OnLoad += AdinplayOnLoad;
Adinplay.OnVideoAdCompleted += AdinplayOnComplete;
}
void AdinplayOnLoad()
{
// AdinPlay is ready to display advertisements
}
void AdinplayOnComplete()
{
// Advertisement video is completed
}
}
Showing banner advertisements
To setup banner advertisements, go to the AdinPlay Editor Tools and click on Create a new Banner Ad.
This will create a new prefab Banner Ad in your Scene. Go to the inspector and add the required AdinPlay
tag to the AdinPlay Banner Ad Behaviour.
By default, the prefab is 100×100 pixels, but can be altered to the required dimensions.
Like video advertisements, banners can be displayed using a Unity UI Button or programmatically.

Related Posts

Leave a Comment