Unity SDK Walkthrough

SDK Version:

2.7.262

Oldest Supported version of Unity:

2020.3

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 objects which will display an advertisement, they must contain a Unity 2D texture. 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. 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.

  5. You can report your application version through the Adinmo Manager inspector by adding it in the Application Version 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…’

  4. Test your project directly in editor by hitting Play. You can enable AdInMo’s Debug tool from Adinmo>Manager which will give you important information about your placement setting.

SDK 2.5.253 simplifies how ad placement sizes are managed with four Placement Types supported:

  • Square (min 250 x 250 pixels)

  • TV (min 480 x 320 pixels)

  • Portrait (min 320 x 480 pixels)

  • Landscape (min 320 x 50 pixels)

The four Ad Placement Types map to IAB’s Fixed Size Ad Specifications and support all display and video ad units for maximum demand opportunities. Aspect ratios that do not match these Placement Types are deprecated and no longer be added to your game. Existing ad placements will continue to serve ads but will generate less revenue and we recommend editing all placements to use one of the four Ad Placement Types.

Make sure to set your texture quality High. You can set it by going to Project Settings>Quality>Texture Settings. This will allow you to scale the placement if your project requires it and still have a high quality ad. This will not affect your app’s performance.

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…

NOTE Keep in mind this method is prone to errors and it’s always best to use the prefabs.

App-ads.txt

App.ads.txt is an industry mechanism developed by IAB to help combat ad fraud. Demand partners check your app-ads.txt file to verify that bid requests are coming from authorized sellers.
It is essential to keep your app-ads.txt file updated to maximize monetization.
Existing app-ads.txt file:
If you already have an app-ads.txt file on your website, you just need to add AdInMo’s details which you can download from the developer portal main page.
_images/app-ads.png

Non-existing app-ads.txt file:

  1. Download the latest app-ads.txt file from your portal page.

  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.

  4. Add the URL containing your app-ads.txt file on your Company profile in the portal. This step is crucial so we can verify it.

The URL should look something like this: www.developer_name.com/app-ads.txt

NOTE

In case you don’t have a website yet or your hosting company doesn’t give you access, you can use a third party service to host your app-ads.txt file.
_images/app-ads1.png

NOTE

The root directory of your website or the web root is the folder where the index.html file is stored and it is publicly accessible.
Anyone typing your URL followed by /app-ads.txt should be able to view your app-ads.txt file.

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.