Search...
Menu

SDK Import and Initialization

1. Integrating HyperBid into Your Unity Project

To begin, please download the latest version of the HyperBid SDK:

System Requirements:

  • Unity 2020.3.34f1 or later
  • Android Platform: Minimum Android 6.0, API Level 23
  • iOS Platform: Minimum iOS 12, requires Xcode 16.2

1.1 Enabling Gradle Templates

To streamline dependency management, it is recommended to enable Gradle template functionality for Android builds within the Unity Editor.

Navigation Path: File > Build Settings... > Player Settings... > Android > Publishing Settings > Build

Ensure that options β‘‘ through β‘₯ are selected as illustrated below.

Android Player Settings

1.2 Importing the SDK Package

Follow the steps below to import HyperBid into your Unity project:

  1. Ensure your target project is open in the Unity Editor
  2. Double-click the downloaded .unitypackage file; alternatively, navigate to Assets > Import Package > Custom package... for manual import
Unity Package
Import

Unity will load and parse the package, subsequently presenting a confirmation dialog that enumerates all files to be imported. Click the Import button to finalize the process.


2. Configuring SDK Settings

The settings panel allows you to configure the Google Ads Application ID.

Navigation Path: HyperBid > Settings

HyperBid Dependency Manager
HyperBid Settings

The configuration options are detailed as follows:

Configuration Option Description
Disable GoogleAds Android AppId When enabled, bypasses the automatic addition of GoogleAds AppId to AndroidManifest. Suitable for projects where this ID has already been configured elsewhere
GoogleAds Android AppId The Google Ads Android Application ID, which will be written to the final AndroidManifest file (required if the above option is not selected)
GoogleAds iOS AppId The Google Ads iOS Application ID, which will be written to the Info.plist file
Skip Swift Configuration When enabled, bypasses Swift environment configuration for the iOS Xcode project. While HyperBid itself requires Swift support, this option may be activated if another tool already handles this configuration
Skip SkAdNetwork Ids Configuration By default, the SDK automatically appends relevant SKAdNetwork IDs to Info.plist. Enable this option to suppress this behavior
Enable GMA properties tag fix Activates the GMA properties tag fix (refer to "Compatibility Handling for Unity 2021 and Earlier Versions" below)

πŸ’‘ Tips

If you are integrating with AdMob, you must provide the GoogleAds AppId


3. Installing Ad Network Adapters

To integrate additional ad networks, navigate to HyperBid > HyperBid Dependency Manager to open the Dependency Manager.

This interface displays all available adapters along with the current HyperBid version information.

HyperBid Menu
HyperBid Dependency Manager

Click the Install button adjacent to your desired adapter, and HyperBid will automatically handle the download and import process.

Important: Following adapter installation, it is imperative to execute EDM4U dependency resolution to update the Gradle templates.

Navigation Path: Assets > External Dependency Manager > Android Resolver > Force Resolve

This step ensures that all dependencies are properly incorporated into the final Android build artifacts. For further information, please consult the Google EDM4U Official Repository.

Force Resolve

4. Compatibility Handling for Unity 2021 and Earlier Versions (Optional)

When integrating the Google Ads adapter in Unity 2021 or earlier versions, the Android build may encounter the following error:

Copy
AAPT: error: unexpected element <property> found in <manifest><application>.

This error originates from the new <property> element introduced in GMA SDK 22.5.0, which is not supported by legacy versions of the Android Gradle Plugin (AGP).

Resolution:

  1. Navigate to HyperBid > Settings
  2. Enable Enable GMA properties tag fix
  3. Append the following code to your mainTemplate.gradle file:
gradle Copy
gradle.projectsEvaluated {
    apply from: 'HyperBidPlugin.androidlib/validate_dependencies.gradle'
}

5. Sample Demo

    1. Upon completing the ad network adapter installation described above, navigate to HyperBid > Configure Build Simulation Scenes and click to proceed
    1. In Build Profiles > Scene List, the sample Scenes will be automatically selected as illustrated below. Build and deploy to a physical device to experience the demonstration
    1. For reference implementation, consult the sample code as depicted below:

6. Initializing the SDK

csharp Copy
McSdkCallbacks.OnSdkInitializedEvent += sdkConfiguration =>
{
    Debug.Log("McSDK Initialized: " + sdkConfiguration.ToString());
    Debug.Log("McSDK Mediation Config: " + McSdk.GetMediationConfig());
};

McSdk.InitializeSdk("your app id", "your app key");

7. Preset Strategy

It is recommended to configure a Preset Strategy to enhance ad loading performance upon the application's initial launch.


Previous
Unity
Next
AD Formats
Last modified: 2025-12-09Powered by