Introduction

In this Disrupted Logic ctalyst tutorial, we’re going to create an Interactive Ad Space in an app or game using the Unity 3D game development engine.

We’re going to assume you’ve already downloaded and installed the ctalyst Unity plugin and have already assigned ctalyst to a GameObject. For this tutorial, we’ve named our object AdHandler.  You can pause and rewind the video at any time to review the download and installation process.

The basic steps are:

  • Log in to your Publisher Dashboard and download the Plugin from the APIs and Tokens module
  • From Unity, select the Assets menu item, select Import Package, Custom Package and install the ctalystSDK.unitypackage
  • Select the GameObject menu, Create Empty
  • Name the new object AdHandler and drag and drop the ctalystSDK (from the Assets/DLI/plugins/ctalyst/ folder) onto it

Your Unity 3D scene is now connected to the ctalyst ad network and is ready to go.

Controller Object

Any person playing your game will have an object assigned to them which they control.  For our tutorial, we will make one called Player.

Click the GameObject menu, select Create Empty and name the new object to Player. The Player GameObject will interact with all interactive ads and product placements in the scene.

From the Unity Project Assets folder, DLI plugins, drag and drop the ctalystPlayerObject component onto the Player object that you just created.

From the Unity Hierarchy Window, drag and drop the AdHandler onto the ctalyst Object field in the ctalyst player object panel of the inspector window.

Creating the Interactive Ad Object

Now, let’s create a plane that will display the Interactive Ad. From the GameObject menu, select 3D object, Plane, and name it to InteractiveAdPlane.

Unity requires objects to have a material assigned to them. You can go ahead and do that now. If you do not know how to create and apply materials, there are many tutorials on the Unity website.  You can also pause and rewind our tutorial video to see how we did it.

To make InteractiveAdPlane interactive, it must be collideable. We will add a collider to it now.

From the InteractiveAdPlane’s Inspector Panel, add a box collider, and ensure “is trigger” has been checked. Adjust the collider to your needs.

The InteractiveAdPlane is now set up and ready to start displaying interactive ads, and we can now add it to the ctalyst system.

Connecting to Disrupted Logic’s ctalyst

From the Unity Hierarchy Window, select AdHandler. This will display the ctalyst SDK plugin in the inspector window.

Click Add New.

Drag and drop the InteractiveAdPlane from the Unity Hierarchy Window onto the Ad GameObject field of the ctalyst SDK plugin in the Inspector Panel.

Set Ad Type to be interactive.

Choose the appropriate size for the ad, or change the size of your object to match an ad.

Select the coupon type. The options are landscape or portrait and your choice depends on how you are displaying coupons in the game’s rewards menu.

Ad Priority determines the order that ads are called and served to your game. Zero is the highest priority and will serve first. You can group ads within the same priority.

Level/Scene is a future feature not currently being used. You can safely ignore it.

In-Game and Real-World Interactivity and Rewards

An interactive ad must reward the player during the game play, and must deliver a coupon for the interaction to the player’s reward menu.

See our Unity Code Docs to get examples and how-to’s of different interactive rewards.

That’s it. You’ve now set up an interactive ad.

Testing Your Setup and Disrupted Logic’s ctalyst Ad Serving

Press the Play button and see how your ad looks. If the ad is upside down, distorted, or otherwise incorrect, simply go back to the unity editor and correct it.

By default, your account is live and serving sandbox ads. As long as you are internet connected, you will be able to develop and test ctalyst live during your game development.

 

Be sure to share the love!