Skip to main content

Before You Begin

Prepare these items before installing DARO Unity SDK:
  • iOS or Android app key from the DARO dashboard
  • Platform-specific DARO key file
  • Ad unit IDs for each ad format
  • Android or iOS build environment

Install SDK

Use DaroPackageInstaller.unitypackage for the recommended installation path.
1

Download Installer Package

Download DaroPackageInstaller.unitypackage from the GitHub Release.
2

Import into Unity Project

In Unity Editor, select Assets > Import Package > Custom Package, then import DaroPackageInstaller.unitypackage.
3

Confirm Package Installation

The installer adds the OpenUPM scoped registry, EDM4U, and so.daro.unity dependency to Packages/manifest.json.The latest so.daro.unity package version is 0.4.0 and uses EDM4U [email protected].
4

Run Integration Manager

In Unity Editor, open Assets > Daro > Integration Manager and validate your project setup.
The installer adds the OpenUPM registry to Packages/manifest.json and starts installing [email protected].

Configure Project

In Unity Editor, open Daro > Integration Manager and enter platform settings.
1

Create Settings Asset

In Integration Manager, select Create Settings Asset.
2

Enter iOS Settings

For iOS builds, enter iOS Daro App Key, iOS Key File, AdMob App ID, and ATT prompt text.
3

Enter Android Settings

For Android builds, enter Android Daro App Key and Android Key File.
4

Enable Android Build Templates

For Android builds, open Edit > Project Settings > Player > Android > Publishing Settings > Build in Unity Editor, then enable these options.
  • Custom Main Gradle Template
  • Custom Gradle Properties Template
  • Custom Gradle Settings Template
Unity creates these files after the options are enabled.
  • Assets/Plugins/Android/mainTemplate.gradle
  • Assets/Plugins/Android/gradleTemplate.properties
  • Assets/Plugins/Android/settingsTemplate.gradle
During the Android build, DARO Unity SDK applies the required Gradle plugins, minimum SDK setting, and ProGuard rules to the exported project.
5

Validate Settings

In Integration Manager, check validation results for the active build target.
When building for Android with Unity 6000.3.17f1 or newer, add the following setting to Assets/Plugins/Android/gradleTemplate.properties.
Starting with Unity 6000.3.17f1, AGP 9.0 enables duplicate Android library namespace checks by default. The Pangle 7.7 pag-sdk and pag-sdk-ad AARs use the same com.bytedance namespace, so manifest merging can fail during processDebugMainManifest. This issue is separate from EDM4U dependency resolution failures.
App keys and key files are not passed to InitializeAsync(). Unity injects them into iOS Info.plist and Android AndroidManifest.xml or gradle.properties at build time.

Initialize SDK

Call DaroSdk.InitializeAsync() when your app starts.
You can set privacy options and user ID before SDK initialization.

Use Ad Instances

Use fullscreen ad instances in this order:
  1. Complete await DaroSdk.InitializeAsync().
  2. Create the ad instance.
  3. Register event handlers.
  4. Call Load().
  5. After load completes, check IsReady() and call Show().
  6. Call Dispose() when the screen closes.
Banner ads are displayed automatically when Load() succeeds. Use Show() only to display a banner again after calling Hide().
SDK callbacks are delivered on Unity’s main thread. Constructors and public SDK methods such as Load(), Show(), Hide(), and Dispose() must also be called from the Unity main thread.
Call Dispose() explicitly when an ad instance is no longer needed. SDK 0.4.0 provides finalizer-based cleanup as a fallback, but cleanup timing is not guaranteed.