LevelPlay Unity package/SDK Integration
Base editor-side checks on the actual project rather than assumptions — read the project files, or ask the user to confirm in the Editor. The C# scripts generated in this skill are MonoBehaviour files for the user to save to their project, not for inline execution.
This skill covers the LevelPlay integration path only; it does not cover other mediation SDKs. If the user explicitly asks about alternatives, acknowledge that alternatives exist and point them to those vendors' own documentation — do not describe, characterize, or make claims about competitor products.
Follow the steps and provide only the files and configurations described in this skill. Do not proactively add steps, create files, or make recommendations based on general knowledge. If the user asks a question outside the scope of this skill, check the skill and reference files first to confirm it is not covered. If it is not, use general knowledge to respond, but do not incorporate additional steps or files into the integration workflow as a result.
Follow the integration workflow sequentially, one step at a time. Ask only the questions for the current step — do not gather information for future steps in advance. Wait for the user's response at each checkpoint before proceeding.
LevelPlay is Unity's ad mediation platform: it connects your game to multiple ad networks simultaneously and runs a unified auction across multiple ad networks and bidders to maximize competition for each impression. This guide walks you through the full integration: installing the SDK, configuring dependencies for Android and iOS, initializing LevelPlay in your project, and implementing rewarded, interstitial, and banner ads. If you already have part of this set up, you can skip ahead to the relevant step.
This SKILL.md is the workflow spine. It keeps the decisions, checkpoints, and exact questions; longer code, full API detail, and edge cases live in references/ and are linked from the relevant step. Read the linked reference when you reach that step — do not answer from general knowledge instead.
Integration Workflow
0. New Integration or Migration?
Ask: "Are you starting a new LevelPlay integration, migrating an existing one (from an older SDK version or from Unity Ads), or troubleshooting an existing setup?"
- New integration: proceed to Step 1.
- Migration (SDK upgrade, replacing IronSource.Agent APIs, migrating from Unity Ads, or fixing a Maven Central Android build failure): Read
references/migration-sdk-9.md. Ask which of the five scenarios applies — A = SDK upgrade, B = init API migration, C = ad unit API migration, D = Maven Central build failure, E = Unity Ads migration — then follow the matching scenario. After applying all code changes, work through the Migration Completeness Checklist (section C5 of the reference) — it catches requirements that a line-by-line translation misses because the legacy code had no equivalent line. Then ask the user to check the Unity console for compilation errors, and fix any that appear before presenting results. Do not block or keep retrying if you cannot see the console: list the files you changed, say what to look for, and continue. - Troubleshooting or adding to an existing setup (ATT, GDPR, ILRD, Test Suite, build errors on a fresh integration, or adding a feature to an already-working integration): Identify what the user needs and go directly to the relevant step or reference from "When to Read Detailed References."
1. Verify Unity Environment
Check that the user is working in a Unity project by verifying Assets/ and ProjectSettings/ directories exist. If not in a Unity project, instruct the user to navigate to their Unity project directory. If those directories are not found but the user believes they are in the right place, ask: "It looks like you may not be at your project root — can you navigate to the top-level folder of your Unity project and confirm you can see Assets/ and ProjectSettings/ there?"
2. Understand Business Goals
Before implementing ad units, determine the user's optimization priorities to recommend the appropriate ad unit strategy. Ask:
"What's your primary optimization goal?"
- Revenue-focused: Maximize ad revenue and impression opportunities
- UX-focused: Prioritize gameplay flow and user satisfaction
- Balanced: Optimize for both revenue and UX
- Not sure yet: Default to Balanced and proceed. At Step 8, briefly note you're using Balanced since they were unsure, and invite them to indicate a different preference now that they've seen the format options.
Record this answer for later strategy recommendation in Step 8.
3. Install LevelPlay SDK via UPM
If the SDK looks already installed: do not take that on trust, and do not ask the user to read
the Package Manager window for you. Read Packages/packages-lock.json and look for
com.unity.services.levelplay. If it is there, say which version resolved and proceed to Step 4.
If it is not, it is not installed, whatever the conversation so far has assumed: continue with the
install below.
Guide through installing the LevelPlay Unity package using Unity Package Manager:
- Open Unity → Window > Package Manager
- Select Unity Registry dropdown or Services tab
- In the Package Manager search bar, type Ads Mediation
- Confirm the package name matches exactly: the correct package is titled Ads Mediation. Do not install either of these packages:
- Ads IAP Mediation Adaptor (a separate in-app purchases package, not the LevelPlay SDK)
- Advertisement Legacy (a deprecated package, not compatible with the current LevelPlay integration)
- Click Install button
- Wait for package to download and import
When you install the package, you may see a prompt to install Mobile Dependency Resolver — click Import if it appears. This is covered in more detail in the next step.
Then verify it resolved, by reading the project rather than by asking. The package id is
com.unity.services.levelplay (its Package Manager display name is Ads Mediation; the id is
what the project files record). Check both files:
Packages/manifest.jsonlists what the project asks for.com.unity.services.levelplaymust appear underdependencies.Packages/packages-lock.jsonrecords what Unity actually resolved. The same id must appear here too, with a concrete version. This is the file that answers "did it install", and it is the one to trust.
Both are plain JSON in the project, so this check needs no Editor, no CLI, and nothing from the user. Read them.
This is a hard gate, not a formality. Do not write, generate, or paste a single line of LevelPlay code until
com.unity.services.levelplayis present inpackages-lock.json. Skipping ahead produces code that looks correct, compiles nowhere, and fails withCS0246on every LevelPl