Introduction

In this tutorial, we’re going to set up the Unity 3D game engine with the ctalyst® plugin for the firs time, and we’ll also configure it to serve a Static and Dynamic Ad.

Download The Plugin

Log in to your Publisher account, click the API, Token & Banking quick button and click View APIs and Tokens.

If you haven’t registered an app or game, you’ll need to do so first.

Click the download plugin/api button, download the plugin, and decompress it.

Importing And Installing The Plugin

Open your app or game project in the Unity 3D game engine.

In this tutorial, we’re working with a blank canvas.

You can import and use all of the features of ctalyst® at any time during your game development cycle.  By default, your approved app or game is “live” and testable in our Sandbox Mode.

Import the plugin by clicking Assets, Import Package, Custom Package.

Navigate to the plugin’s Unity folder, select and load the ctalystSDK.unitypackage.  Select “All” and import.

You’ll now notice a DLI (short for Disrupted Logic Interactive) folder in the Unity Project Assets window.  This folder contains everything you’ll need to fully implement the plugin including ad serving, the user registration, and the rewards menu system.

Creating a Scene GameObject

For every scene that we’d like to serve ads in, we’ll need to create a ctalyst game object.

Click the GameObject menu, create empty, and name this new object to ctalystGameObject.

From the Unity Project Assets window, navigate to the DLI folder, plugins, ctalyst.

Drag and drop the ctalystSDK onto the ctalystGameObject that you just created.

The plugin is now attached and active within your game scene.  It’s really that easy!

Creating Your First Static and Dynamic Ad Spaces

To serve ads, simply select any object whose surface is the correct size and aspect ratio and attach it to the ctalyst plugin within the Inspector Window.

Dynamic ads are those in which many advertisers can place their ads.  The Dynamic ad space will cycle through up to 3 advertisers at a time.  Think of a Dynamic ad board as you would the billboard at the side of the road that changes every few seconds.

Static ads are those in which one advertisers places one ad.  Static ad boards do not change during a game play session.

Let’s create a plane that will serve Static Ads.  From the GameObject menu, select 3D object, Plane, and name the new plane to StaticAdPlane.

And let’s create a second plane that will serve Dynamic Ads.  From the GameObject menu, select 3D object, Plane, and name this new plane to DynamicAdPlane.

Materials and Textures

Unity requires surfaces to have a material assigned to them.  If you already know how to apply materials to surfaces, you can go ahead and apply materials to both the StaticAdPlane and DynamicAdPlane.

You can apply any default texture you would like to the Static and or Dynamic ad surface.  This guarantees the space will never be empty or displaying the default “grey” color from the game engine.  It also ensures that should the gamer not have access to Internet, the image that appears matches the look and feel of your game.

We’ve provided a Photoshop Image Kit that is downloadable from your dashboard.  It contains everything you’ll need to build ad boards quickly and easily.  You can also watch our Photoshop tutorials to hone your Photoshop skills.

Activating The Scene

Select the ctalystGameObject, the ctalyst plugin will appear within the Inspector window.

Copy the Publisher Token to the Token Field of the plugin, and the Game ID to the Content ID field.

You only need to do this once for each scene.

Serving Ads On Your Ad Spaces

Click the Add New button.

Drag and drop the StaticAdPlane onto the Ad GameObject field of the plugin.  This tells the ctalyst system that StaticAdPlane is an ad space.

Set the Ad Type to Static.

Change the ad size or code to match the object, or change the object’s dimensions to match the desired ad size.

Select the coupon type. The options 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.  Use this to optimize the performance of your game and reduce server load and lag times.

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

Now let’s set up the Dynamic Ad.

Click the Add New button,

Drag and drop the DynamicAdPlane onto the Ad GameObject field of the Ad GameObject field of the second ad serving instance.

Just like Static, set the ad type … this time select Dynamic, the ad size, coupon type, and ad priority.

That’s it.  You’ve now set up two different types of ads.

Testing Your Ads

Press the Play button and see how your ads look.  If any 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!