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

Setup

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

Installation

Install the Bridge package for your engine:

JS Core contains the shared SDK logic. Engine packages for Unity, Godot, Construct and other engines are wrappers around JS Core. Use JS Core directly in web engines such as PlayCanvas, Phaser, LayaAir and similar frameworks.

Integration

Add the script from CDN:

<html>
    <head>
        <script src="https://bridge.playgama.com/v2/stable/playgama-bridge.js"></script>
    </head>
    <body>...</body>
</html>

When the game launches on a supported platform, Bridge automatically loads the required platform scripts. In unsupported environments, Bridge uses a mock platform and returns safe defaults (false, reject, etc.) instead of throwing.

Initialization

Call the initialization method and wait for it to finish before using any bridge.* API.

bridge.initialize()
    .then(() => {
        // initialization was successful, SDK can be used
    })
    .catch(error => {
        // error, something went wrong
    })

Required steps

Installation is only the first part of the integration. Every game must also implement the required steps. See the full list with exact methods in API → Required steps.

Last updated