Unity SDK Walkthrough

SDK Version

2.2.1

Oldest Supported version of Unity

2018.4

Below you’ll find our handy SDK walkthrough guide to using the AdInMo SDK with your game project within Unity.

Register with AdInMo

To begin using the AdInMo SDK, you need to create an account on our developer portal.

  1. Go to AdInMo Website , select the ‘Portal’ dropdown and click Sign Up. You can sign up using your email address or your Google account.

  2. Fill in the appropriate details and confirm your account using the instructions given. If signing up via email you will be asked to confirm your account.

Portal: Creating a Game

A Game is a representation of your game within AdInMo. During this process you will create a Game Key that is required to work with the AdInMo SDK, please keep this information private.

  1. Login to your developer account on AdInMo and Click the + Add New Game button.

  2. Fill in the details of your game and click Save. These details can be edited at any time.

  3. Each game has its own game key, this can be viewed on the details page of a game. You will need this game key later on in the process.

  4. To view the details of your game, simply click the name of the game you want to view, either on the overview or game list page.

Portal: Creating a Placement

This part requires at least one game on the portal.

Placements are simply an object which will display an advertisement, they must contain a Unity 2D texture. Placements can be grouped together to show the same advertisement across different placements. One game can support multiple placements.

During this process you will create a Placement Key that is required to work with the AdInMo SDK, please keep this information private.

  1. View the game you wish to create a placement for on the portal and click the, + Add New Placement button, if you already have any placements they can be viewed here.

  2. Fill out the details of your placement and select an aspect ratio. Placements can be edited at any time.

  3. To create a group, click New Group. Once a group has been created it can be edited by clicking Edit Group. By default, a placement is set to have no group.

  4. Each placement has its own placement key, this can be found on the placement list. You will need this placement key later on in the walkthrough.

Portal: Adding a test device

Adding a test device will enable us to look in more details on our side if you experiense any issues.

  1. To add a test device, go your profile on the portal and select the game you wish to add the device on.

  2. From the menu, choose Test devices and then ‘Add test device’. You’ll be presented with a list of devices which have accessed your app, along with their UID, session start and IP address.

  3. Choose a device and click Add Device.

Portal: Cross Promotion Ads

Cross Promotion Ads allow you to use unfilled ad placements to promote other games in your portfolio. Remember these are immersive non-clickable ads so simple creatives focused on logos and character art will work best.

  1. Choose an image in accordance with the supported aspect ratios.

  2. The image must be in JPEG or PNG format and should not exceed 1MB in size.

When you’re ready for the campaign to go live please drop us a quick email to support@adinmo.com. We will then do a quick brand safety and copyright check and then put your campaign live.

Setting up the SDK within Unity

After you’ve set up the account, you can then download our latest SDK here

Oldest Supported version of Unity 2018.4

Release notes for the AdInMo SDK can be found here

When updating an older version of the AdInMo SDK, the best practice is to delete the existing AdInMo folder in assets before importing the latest version of the SDK.

  1. After you’ve downloaded the SDK, create or open a project within Unity Editor. If you’ve downloading from the Unity Asset Store, you can either import from the package manager or through the asset store tab depending on the unity version.

  2. From the top menu, click Assets > Import Package > Custom Package and locate the Unity package containing the SDK. Ensure all the items are selected and click Import.

  3. You should now see a folder called Adinmo displayed in the Unity Assets window.

AdInMo Manager

  1. First, the AdinmoManager prefab needs to be added to the scene. Next, copy and paste the game key of your game into the AdinmoManager.

  2. From the Assets window, select Adinmo > Prefabs and click and drag the prefab called Adinmo Manager into the scene hierarchy.

  3. If you are working on a development build, please check this box on the Adinmo Manager.

  4. Navigate back to the portal and to the appropriate game, view the details of the game on the portal and copy the game key (starts with gk…). In Unity Editor, click on the AdinmoManager prefab and paste the copied game key in the game key field.

Adding placements

AdInMo SDK 2.0 supports game objects templates (image, quad and sprites) of different aspect ratios that you can add to your scene without the need to manually create them.

  1. Go to the AdInMo folder in the assets window and select prefabs.

  2. From here, you can select the appropriate game folder for the game object you want to add. Each game object is named with its aspect ratio.

  3. Paste the placement key of the placement from the portal into the placement key field. Placement keys start with pk…

Currently you can choose from these aspect ratios: 1:1 (min 250 x 250 pixels), 2:1/1:2 (min 500 x 250 / 250 x 500 pixels), 3:1 (min 750 x 250 pixels), 16:9 (min 400 x 225 pixels), 2.35:1 (min 588 x 250 pixels), 2x3 / 3x2 (min 256x384 pixels / 384x256 pixels), 3x4 (min 192x256 pixels), 4x3 (min 256x192 pixels), 5x4 (min 320x256 pixels), 6x1 (min 1536x256 pixels) and 8x1 (min 2048x256 pixels).

Aspect ratios are now grouped into three categories:

  1. Priority - These are the most popular ad sizes for campaigns. Integrating priority ratios in your game helps maximize monetization.

  2. Additional - We also support other aspect ratios to give you the most choice & control when designing InGamePlay ads.

  3. Unsupported - These aspect ratios are not popular ad units for advertisers and are not recommended for monetization optimization or revenue optimization.

AdinmoTexture Component

If you want to create your own game object from scratch, you can use the AdInMo texture component on the game object that will act as the advertising placement within your game.

  1. Create a game object, either an image, quad or sprite, select the game object in the scene and click Add Component in the inspector window.

  2. In the search box, type and select Adinmo Texture.

  3. Paste the placement key of the placement from the portal into the Adinmo Texture component, Placement keys start with pk…

App-ads.txt

app.ads.txt is a way of helping to combat fraud. You can find more info and our latest app-ads.txt file here

Existing app-ads.txt file:
If you already have an app-ads.txt file added to your website, just add our details.

Non-existing app-ads.txt file: 1. Ensure that your Googleplay or Apple App sSore has your developer URL filled in. This must be the same URL that will serve the app-ads.txt file. 2. Ensure your web server can serve your developer url as plain text. 3. Place the app-ads.txt file provided in the root directory of your website. https://developer_name.com/app-ads.txt must serve the app-ads.txt as plain text and you should replace developer_name.com with your own URL.

Finished!

Run your game and advertisements will appear in your game.

For support, please check our FAQ.

Please Note!

You will not be able to see impressions using a development build, uncheck this option if you are building a release.

Unity Editor also has its own development build option under File, Build Settings. Ensure the Development Build option is not checked when building for release.