SDK

Unity SDK integration should take no more than 10 minutes of your time, it really is that easy!
Our walkthrough goes through everything step-by-step to get the AdInMo SDK working with your game project within Unity.

If you have any questions, contact us at support@adinmo.com

We have recently updated to our new developer portal!

If you already have an AdInMo account you will need to update your account. Information and instructions on how to do this can be found at the bottom of the page, click here.

Importing SDK to Unity

1. Open your project within Unity.

2. Navigate to the main menu, click ‘Assets‘ followed by ‘Import Package‘ and ‘Custom Package‘.

3. Select the AdInMo unity package you downloaded in the previous section, ‘Download SDK’.

4. Ensure all the assets are selected and click ‘import‘.

AdInMo Manager

An example scene is available with the SDK to use as a reference, from the assets window select ‘AdInMo’, ‘Example’, and open ‘ExampleImage.unity’.

1. Once you have imported the unity package you should now see a folder called ‘AdInMo’ in your assets window.

2. From assets, click into ‘AdInMo‘ and then ‘Prefabs‘. Here you should see a prefab called ‘AdInMo Manager‘.

3. Click and drag the ‘AdInMo Manager‘ prefab into your scene’s hierarchy.

4. If you are creating an internal Unity ‘Release’, please check ‘Development Build‘ within AdInMo Manager to ensure no false information is being sent to our servers.

Please note, you will not be able to see impressions using a development build.
Unity Editor has its own development build option under File, Build Settings. Ensure the ‘Development Build‘ option is not checked when building for release.

Adding Game Key to Unity

These steps require you to have a Game Key.

It is important that you keep Game Keys and Placement Keys private and do not share them with anyone.

If you haven’t created a game on the AdInMo website yet, follow the steps in the Creating a Game section of the walkthrough.

1. Select ‘AdInMo Manager’ from your scene’s hierarchy and navigate to the inspector window.

2. Copy the Game Key for your game and paste it into the ‘Game Key’ field within the Inspector.

Adding AdInMo Component

This step requires you to have at least one game object in your scene that will be used as a placeholder for advertisements – this can be an image, quad or sprite.

1. Create or use an existing game object and select it in the scene hierarchy and navigate to the inspector window.

2. From the inspector, click ‘Add Component‘ on the game object you want to add advertisements to.

3. Using the search feature, search and select ‘AdInMo Texture‘. This will add the component to your game object.

Adding a Placement to Unity

These steps require you to have a Placement Key.

It is important that you keep Game Keys and Placement Keys private and do not share them with anyone.

If you haven’t created a placement for your game yet, follow the steps in the Creating a Placement section of the walkthrough.

1. Select the game object in the hierarchy that has the AdInMo Texture component outlined in the previous steps.

2. From the inspector, paste in your Placement Key in the relevant field.

3. Please note sharing the same placement key between multiple AdInMo texture objects will result in the same texture being shown on all of those objects.

4. To ensure your placement is large enough to generate revenue, check the ‘Debug Size Threshold‘ in AdInMo Manager, in the inspector window.

A border will appear around your placement. Green means you are able to generate revenue from your placement. Red means your placement is currently too small.

Finished!

That’s it! You can now run your project within Unity and view advertisements.

You can view the performance of your games by clicking the performance link on the left sidebar. Here you will see a graph that outlines your impressions, revenue and daily users. You can change the view for games and change the timeline by using the drop-down menus.

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.

A few things to note:

  • To maximize revenue, advertisements are cycled every several seconds automatically.
  • From your developer account, you will not see impressions when running development builds or from within the Unity Editor as they are not recorded in development or debug mode.
  • Texture is replaced at run-time, as it is an asynchronous web request. This means the original texture will display until the new one has been downloaded.

If you have any issues with the AdInMo SDK check our FAQ page to find a solution or contact support at support@adinmo.com

What’s Next?

Check out the Advanced section below to further the AdInMo SDK within your project. This is entirely optional and is not a requirement of the SDK.

Questions or Comments?

We’re always looking to improve. Feel free to reach out with any questions or comments you may have at support@adinmo.com