Get Started with Unity
Before You Begin ๐
- Sign up for a Chartboost Mediation account.
- Add apps to the Mediation platform. (See Import Apps)
- Set up Ad Placements in the Mediation platform. (See Manage Placements)
Current SDK version: 5.2.0
โ Open Source
โ SDK API Reference
Minimum Supported Development Tools ๐
Software | Version |
---|---|
Minimum Unity Editor Version | 2022.3.22f1 (2022 LTS) |
Minimum Supported Android Version | API 21 (Android 5.0 Lollipop) |
Android Compile Version | API 34 |
Gradle | 8.2 |
Kotlin | 1.9.21 |
Recommended Java | 17 |
Minimum Supported iOS Version | 13 |
Minimum XCode Version | 15 |
Swift | 5.0 |
Chartboost Core Unity SDK is required for Chartboost Mediation 5.x+ initialization and is designed to manage and facilitate different modules for your Unity application/game. Each module can be individually initialized with metrics collected and reported to offer detailed insights into the moduleโs performance and potential issues.
For more information, review our Chartboost Core SDK documentation.
API 34+ Compatibility ๐
Many of our Partners have transitioned to using newer versions of Gradle than what is currently supported by our minimum Unity Editor version of 2020.3. In the event that you encounter Gradle related problems when compiling for API 34+, we recommend one of the following solutions.
Upgrading to Unity 2022.3 ๐
Upgrading to Unity 2022.3 will get the latest set of Android tools compatible with the newest adapters and libraries.
Android Studio AGP Upgrade Tool ๐
A workaround using Android Studioโs Android Gradle Plugin Upgrade Tool will allow you to upgrade your Gradle version from 6.1.1, to anything higher. We have documented the process in a short video where we upgrade from AGP 4.0.1 to 8.1.2.
Unity Editor 2021.3.41f1 ๐
To build Unity editor 2021.3.41f1+ for Android API 34+, complete the following:
- Update Googleโs EDM to latest version.
- Delete exiting
mainTemplate.gradle
&gradleTemplate.properties
. - Generate new:
- mainTemplate.gradle
- gradleTemplate.properties
- settingsTemplate.gradle
- Force resolution of dependencies.
Integrate Chartboost Mediation Unity SDK ๐
Using the public npm registry ๐
In order to add the Chartboost Core Unity SDK to your project using the npm package, add the following to your Unity projectโs manifest.json
file. The scoped registry section is required in order to fetch packages from the NpmJS registry.
"dependencies": {
"com.chartboost.mediation": "5.2.0",
...
},
"scopedRegistries": [
{
"name": "NpmJS",
"url": "https://registry.npmjs.org",
"scopes": [
"com.chartboost"
]
}
]
Using the public NuGet package ๐
To add the Chartboost Mediation Unity SDK to your project using the NuGet package, you will first need to add the NugetForUnity package into your Unity Project.
This can be done by adding the following to your Unity projectโs manifest.json
.
"dependencies": {
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
...
},
Once NugetForUnity
is installed, search for Chartboost.CSharp.Mediation.Unity
in the search bar of Nuget Explorer window (Nuget > Manage Nuget Packages).
You should be able to see the Chartboost.CSharp.Mediation.Unity
package. Choose the appropriate version and install.
Android Manifest ๐
Add the following required permissions to your Android Manifest .xml file:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Warning
It is important to notice that permissions might increase depending on your partner adapter integrations. Always refer to the partner adapterโs SDK integration guides for complete details.