Search...
Menu

SDK Import and Initialization

💡 Tips

  • 🔧 Unity version: 2018.2 or higher (For Admob, Unity 2022.3.x or higher is required)
  • ⚠️ Please call all APIs of this SDK on the main thread

🟢 For Android, this plugin requires you to enable Jetifier. To enable Jetifier, follow these steps:

  1. In Unity, select Assets > External Dependency Manager > Android Resolver > Settings.
  2. In the Android Resolver Settings dialog that appears, check Use Jetifier
  3. Click OK

🔵 For Android, this plugin requires you to generate template gradle files. To generate the files, follow these steps:

  1. In Unity, select Project Settings > Player > Publishing Settings.
  2. Find "Custom Main Gradle Template", "Custom Gradle Setting Template", "Custom Gradle Properties Template", and check them
  3. Select Assets > External Dependency Manager > Android Resolver > Force Resolve

🟠 If you're integrating Admob, you must add Admob's APPLICATION_ID. Please follow these steps:

  1. In Unity, select Project Settings > Player > Publishing Settings.
  2. Find "Custom Launcher Manifest", and check it
  3. Add the configuration to the generated file as follows:
xml Copy
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <application  android:label="@string/app_name">

        <!--Admob APPLICATION_ID start-->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="<your admob application id>" />
        <!--Admob APPLICATION_ID end-->

    </application>

</manifest>

1. Import the Plugin into Unity

Please follow these steps to import the plugin:

(1). In Unity, select Assets > Import Package > Custom Package
(2). Select the Unity plugin file you downloaded
(3). In the Import Unity Package dialog, click Import


2. Initialize the SDK

csharp Copy
McSdkCallbacks.OnSdkInitializedEvent += sdkConfiguration =>
{
    // McSDK is initialized, configure and start loading ads.
    Debug.Log("McSDK Initialized: " + sdkConfiguration.ToString());
    Debug.Log("McSDK Mediation Config: " + McSdk.GetMediationConfig());
};

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

3. Preset Strategy

It is recommended to configure a preset strategy to improve ad loading performance during the first launch of your application


Previous
Unity
Next
AD Formats
Last modified: 2025-07-29Powered by