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

Cross-Promo

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

Cross-promotion: show the player more games — either a static list you configure, or the platform's own catalog. Bridge ships a ready-made promo modal (show() / hide()) and a data API (getGames()) if you prefer to render your own UI.

Configuration

Configure the module in the config under the crossPromo key:

{
    "crossPromo": {
        "title": "More games",   // optional modal title
        "source": "config",      // 'config' = static list below (default), 'platform' = platform SDK catalog
        "games": [               // used when source = 'config'
            { "url": "https://...", "icon": "https://...", "name": "Game A" }
        ]
    }
}

With source: "platform" the list comes from the platform SDK catalog on platforms that expose one (currently yandex); elsewhere it resolves to an empty list.

Get Games

Returns the full games list from the configured source, normalized to a single shape. Resolves to an empty array when the source has no games or errors.

bridge.crossPromo.getGames()
    .then(games => {
        games.forEach(game => {
            console.log(game.name, game.url)
        })
    })
private void Start()
{
    Bridge.crossPromo.GetGames(OnGetGamesCompleted);
}

private void OnGetGamesCompleted(bool success, List<Dictionary<string, string>> games)
{
    if (success)
    {
        foreach (var game in games)
        {
            Debug.Log($"{game["name"]}: {game["url"]}");
        }
    }
}

Call the Cross Promo Get Games List action, then handle the On Cross Promo Get Games List Completed trigger. Read the result with the CrossPromoGamesCount and CrossPromoGamesPropertyValue(gameIndex, property) expressions (property is a field name like "name", "url", "iconUrl", "coverUrl"), or take everything at once with CrossPromoGamesAsJSON.

Copy This Example

Call the Cross Promo Get Games List action, then handle the On Get Games List Completed condition. Read the result with the PlaygamaBridge::CrossPromoGamesCount() and PlaygamaBridge::CrossPromoGamesPropertyValue(gameIndex, property) expressions (property is a field name like "name", "url", "iconUrl", "coverUrl").

Copy This Example

Each Game is normalized to:

Show / Hide

Shows the built-in promo modal with a random selection of games (up to 4). The modal closes on the close button, on a click outside, and automatically when an interstitial or rewarded ad starts.

Use the Cross Promo Show / Cross Promo Hide actions and the Is Cross Promo Visible condition.

Copy This Example

Use the Cross Promo Show / Cross Promo Hide actions and the Cross Promo Is Visible condition.

Copy This Example

Last updated