Unity Ads

In this article, you will learn how to use Nimbus to request and render ads using Unity Ads SDK.

Be sure Nimbus is initialized before continuing with the Unity integration.

Please follow the Integration article and make sure Nimbus is initialized before continuing with the Unity integration.

Integrating Unity demand into Nimbus requires UnityAds SDK which can be imported using CocoaPods or downloaded here. The currently supported version is listed in the dependencies article.

Installation

Swift Package Manager

Following the steps defined in the integration section to install Nimbus using Swift Package Manager, include the package 'NimbusUnityKit' in the selected packages.

CocoaPods

  1. Add the subspec NimbusUnityKit for the NimbusSDK declaration into your project’s Podfile. pod 'NimbusSDK', subspecs: ['NimbusKit', 'NimbusUnityKit']

  2. Run pod install

Unity Ads SDK will be automatically installed when using CocoaPods

Manual Installation

Include source files for NimbusUnityKit under NimbusUnity/ directory.

Configure the SDK to include Unity

Requesting

NimbusAdManager.requestInterceptors = [NimbusUnityRequestInterceptor(gameId: "YOUR_UNITY_GAME_ID")]

Rendering

Nimbus.shared.renderers = [
      // ..
    .forNetwork("unity"): NimbusUnityAdRenderer()
]

After completing the steps above, your app will be ready to show Unity Ads.

Last updated