For the complete documentation index, see llms.txt. This page is also available as Markdown.

AdBlock

You are reading the documentation for Bridge SDK v2. If you need the obsolete v1 documentation, see Documentation (v1).

Detect whether the player has an ad blocker enabled. This is informational only: it does not suppress ads, but it lets you adapt UI, skip empty banner slots, or show a polite prompt.

Call this when you need to adapt ad-related UI for players with blocked ads.

bridge.advertisement.checkAdBlock()
    .then(result => {
        console.log(result) // true or false
    })
    .catch(error => {
        console.log(error)
    })
private void Start()
{
    Bridge.advertisement.CheckAdBlock(OnCheckAdBlockCompleted);
}

private void OnCheckAdBlockCompleted(bool result)
{
    Debug.Log(result); // true or false
}

In the event sheet:

  1. On a trigger (e.g. Button → On clicked), add the PlaygamaBridge Check Ad Block action.

  2. Add the On Check AdBlock Completed condition. Inside it, use the Is AdBlock Detected condition to branch your UI.

Copy This Example
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-clicked","objectClass":"Button"}],"actions":[{"id":"check-adblock","objectClass":"PlaygamaBridge"}]},{"eventType":"block","conditions":[{"id":"on-check-adblock-completed","objectClass":"PlaygamaBridge"}],"actions":[],"children":[{"eventType":"block","conditions":[{"id":"is-adblock-detected","objectClass":"PlaygamaBridge"}],"actions":[{"type":"comment","text":"adblock detected"}]}]}]}

In the events sheet:

  1. On a trigger (e.g. Button is clicked), add the Check AdBlock action.

  2. Add the On Check AdBlock Completed condition. Inside it, use the Is Ad Block Detected condition to branch your UI.

Copy This Example
Platform support · all 25 platforms

Supports: crazy_games, discord, dlightek, facebook, game_distribution, gamepush, gamesnacks, huawei, jio_games, lagged, microsoft_store, msn, ok, playgama, poki, portal, reddit, samsung, telegram, tiktok, vk, xiaomi, y8, yandex, youtube

Last updated