Agent Skill · BidMachine

bidmachine-unity

Add BidMachine Plus as a First Look layer in front of a Unity game's existing ad mediation (C#, package com.bidmachine.plus). Use this whenever someone wants to request an interstitial or rewarded ad from BidMachine Plus before their current mediation and fall through to it (AppLovin MAX, Google AdMob, Unity LevelPlay, or another) on a no-fill or timeout: installing the plugin via Unity Package Manager scoped registries, resolving External Dependency Manager, initializing the SDK in Mediation mode, and wiring a First Look controller that requests BidMachine first and hands off to the existing waterfall otherwise. Covers setting up the recommended Unity MCP server so the agent can install packages and read compile errors. Treat any "BidMachine First Look on Unity" request as in scope. Stay out when the work targets Android-native or iOS-native (Kotlin/Java/Swift), or is a plain BidMachine install with no fall-through to an existing mediation.

Provider: BidMachine Path in repo: SKILL.md

Skill body

BidMachine Plus — Unity First Look

First Look requests a BidMachine Plus ad before the existing mediation, on a timeout. If BidMachine fills in time, you show its ad. On a no-fill or timeout, the request falls through to the game’s existing mediation, which runs as it did before. No prices or signals pass between the two.

This skill integrates First Look for interstitial and rewarded ads. It does not replace the project’s mediation and does not change banners — it adds a layer in front and preserves what is already there.

What you are building

The behavior and the embedding procedure are in references/first-look.md; a reference controller to adapt is in references/controller-reference.md.

Checklist

Create a task for each item and complete them in order. The how-to for each is in the section below. Items 1–3 gather context and choices; 4–8 act on them.

  1. Choose the tooling path — Unity MCP (recommended) or manual.
  2. Explore the project — mediation in use, where ads are shown, existing privacy calls, package state.
  3. Confirm the mediation and collect IDs — app key, placements, existing ad-unit IDs, timeout.
  4. Install — two scoped registries, then the com.bidmachine.plus package.
  5. Plan — present the First Look change and get approval before editing.
  6. Implement — the manager, the controllers, and the adapter over the existing mediation.
  7. Privacy — mirror the project’s existing COPPA / non-personalized settings onto BidMachine.
  8. Verify — compile and check the console (MCP), or hand the build steps to the user (manual).

Requirements

Unity 2021.3+ (the plugin’s minimum — the unity field in its package.json), and the game’s existing ad mediation already integrated and working, since First Look needs something to fall through to. That mediation can be a UPM package or live under Assets/ — either works.

1. Choose the tooling path

First Look works best when the agent can install the package and read compile errors directly. Before anything else, ask the user one question with three options and wait for the answer:

The recommended server is CoplayDev Unity MCP (https://github.com/CoplayDev/unity-mcp), which supports a range of Unity versions and can add scoped registries, install packages, and read the console. On the MCP path, prefer it for every install and compile step below.

Tell the user up front: when the scoped registry is added (step 4), Unity shows a one-time “Importing a scoped registry” popup that they must click Close for the integration to continue — the agent and MCP cannot dismiss it. See references/install.md.

2. Explore the project

Ground the integration in what is already there. Before editing:

3. Confirm the mediation and collect IDs

Confirm, don’t ask blind. State what you found in step 2 — the mediation in use and the actual script that shows the ads (for example, “AppLovin MAX, shown from your main game-loop script”) — and ask the user to confirm before you build on it.

Collect the values First Look needs. The existing mediation’s ad-unit IDs are usually already in the project — find them and present for confirmation. The First Look timeout defaults to ~15000 ms (tunable from reporting). The new values are the BidMachine app key and a placement ID per format (interstitial, rewarded), from the BidMachine dashboard.

Ask for those as values the user can paste in a single reply — and that actually capture what they paste — offering “use placeholders for now” as the alternative in the same ask. For example: “Paste your BidMachine app key and interstitial/rewarded placement IDs, or say to use placeholders for now.” Don’t pose it as a pick-one “provide now vs later” prompt: that doesn’t capture the values, so the run continues without them. If the user pastes them, use them; if they choose placeholders (or don’t have them yet), scaffold clearly-marked YOUR_… placeholders and report them as the remaining blocker — the verifier FAILs on leftover placeholders.

4. Install

Install com.bidmachine.plus from the BidMachine scoped registry, with its External Dependency Manager dependency resolved through UPM. references/install.md is the full recipe — coordinates, the two registries and when each is needed, reconciling with an existing manifest.json, the MCP and manual paths, the scoped-registry popup, the EDM duplicate check, and resolving the native dependencies.

5. Plan, then get approval

Before editing code, research how the existing mediation is structured and write a short plan: which files you add or change (extend the existing ad manager if there is one, or add a non-conflicting one; the controllers; the adapter), how the controller will call the project’s existing load/show, where the mediation’s init moves to and where the manager’s init replaces it, and how the show sites change. Present it and ask the user to approve or adjust. Do not start editing on assumptions.

6. Implement

Follow references/first-look.md for the behavior and the embedding procedure, and references/controller-reference.md for the controller’s fixed mechanics — adapt it to the project, don’t copy it verbatim.

7. Privacy

Mirror the project’s existing privacy settings onto BidMachine at init: for each privacy flag the project sets on its mediation, make the matching sdk.Regulations call with the same value the project passes there. These flags are usually per-user (from an age gate, a consent prompt, or a stored setting), so pass the same source the project already uses:

GDPR (IAB TCF), CCPA, and GPP need no calls — BidMachine reads them from the CMP automatically, the same signal the mediation already uses.

8. Verify

MCP path: install confirmed, then trigger a recompile and read the console. Resolve any errors your changes caused — fix the trivial ones, and for the rest gather the error and the surrounding code and decide with the user. Run the bundled checker:

python3 scripts/verify_integration.py /path/to/unity/project

It prints PASS / WARN / FAIL for the registry, the package, External Dependency Manager, the init mode, a BidMachine ad, and leftover placeholders.

Manual path: you cannot read the console, so the build is the user’s to run. Have them install per step 4, close the scoped-registry popup, run the Android/iOS resolver, and report console output back to you. You can still run verify_integration.py on the project files yourself, and diagnose from what the user reports.

Stuck on an error? The read-only bidmachine-unity-guide agent (when available) diagnoses registry/UPM, EDM duplicates, export, and First Look controller problems against the installed plugin source. Consult it, then apply the fix it points to.

Integration checklist

Skill frontmatter

license: Apache-2.0

Work with this as data

Every skill here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for agent skills

4 MCP tools reach this
  • find_skillsBrowse and filter every skill in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This skill
curl "https://apis.io/api/v1/skills/bidmachine-unity"
All agent skills
curl "https://apis.io/api/v1/skills?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.