# Get Started with Unity

## Before You Begin

- Sign up for a [Chartboost Mediation](https://chartboost.com/mediate) account.
- Add apps to the Mediation platform. (See [Import Apps](/en/mediation/import-apps/))
- Set up Ad Placements in the Mediation platform. (See [Manage Placements](/en/mediation/manage-placements/))

**Current SDK version: 5.3.0**  
[↗ Open Source](https://github.com/ChartBoost/chartboost-mediation-unity-sdk){:target="_blank"}  
[↗ SDK API Reference](https://reference.chartboost.com/mediation/unity/){:target="_blank"}


## Minimum Supported Development Tools



<table>
	<thead>
		<tr>
			<th>Software</th>
			<th>Version</th>
		</tr>
	</thead>
	<tbody>
		
		<tr>
			<td>Minimum Unity Editor Version</td>
			<td>2022.3.22f1 (2022 LTS)</td>
		</tr>
		
		<tr>
			<td>Minimum Supported Android Version</td>
			<td>API 21 (Android 5.0 Lollipop)</td>
		</tr>
		
		<tr>
			<td>Android Compile Version</td>
			<td>API 34</td>
		</tr>
		
		<tr>
			<td>Gradle</td>
			<td>8.2</td>
		</tr>
		
		<tr>
			<td>Kotlin</td>
			<td>1.9.21</td>
		</tr>
		
		<tr>
			<td>Recommended Java</td>
			<td>17</td>
		</tr>
		
		<tr>
			<td>Minimum Supported iOS Version</td>
			<td>13</td>
		</tr>
		
		<tr>
			<td>Minimum XCode Version</td>
			<td>15</td>
		</tr>
		
		<tr>
			<td>Swift</td>
			<td>5.0</td>
		</tr>
		
	</tbody>
</table>


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](/en/mediation/integrate/core/unity/) 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.

<video controls preload="none" width="480" height="360">
  <source src="/assets/video/Unity_API34_Build_Steps.m4v" type="video/mp4">
</video>

#### Unity Editor 2021.3.41f1

To build Unity editor 2021.3.41f1+ for Android API 34+, complete the following:
1. Update [Google's EDM to latest version](https://developers.google.com/unity/archive#external_dependency_manager_for_unity){:target="_blank"}.
2. Delete exiting `mainTemplate.gradle` & `gradleTemplate.properties`.
3. Generate new:
  - mainTemplate.gradle
  - gradleTemplate.properties
  - settingsTemplate.gradle
4. Force resolution of dependencies.

![](/assets/images/articles/unityeditor_2021-2-41f1.png)


## 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.

```json
"dependencies": {
    "com.chartboost.mediation": "5.3.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](https://github.com/GlitchEnzo/NuGetForUnity){:target="_blank"} package into your Unity Project.

This can be done by adding the following to your Unity project's `manifest.json`.

```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:

```xml
<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](/en/mediation/integrate/unity/integrate-network-sdks/). Always refer to the partner adapter's SDK integration guides for complete details.