# Setup

### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Integration <a href="#integration" id="integration"></a>

Download the latest `playgama_bridge.zip` archive, unzip it, and place the contents into `res://addons`:

* [GitHub releases page](https://github.com/playgama/bridge-godot/releases) for Godot 3
* [GitHub releases page](https://github.com/playgama/bridge-godot-4/releases) for Godot 4

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FZ7Qu2PMJn8ySRaKhWrlZ%2FScreenshot%202024-10-17%20at%204.36.04%E2%80%AFPM.png?alt=media&#x26;token=dccd6f5b-935e-453b-bbf5-8ab0b597389b" alt="" width="374"><figcaption></figcaption></figure>

Enable the plugin in the project settings:

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FandsHryC6a0OuL5MZpqN%2FScreenshot%202024-10-17%20at%204.37.08%E2%80%AFPM.png?alt=media&#x26;token=98d68039-25e1-4865-9fa6-4dfe382a3cc0" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Make sure that Bridge is in the first place in the AutoLoad tab.
{% endhint %}

### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Config <a href="#config" id="config"></a>

In the `addons/playgama_bridge/template/playgama-bridge-config.json` config file you can set up various identifiers and in-game purchases.

You can see an explanation of the file structure here: [playgama-bridge-config](https://wiki.playgama.com/playgama/sdk/playgama-bridge-config "mention").

### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Initialization <a href="#initialization" id="initialization"></a>

When the game is loaded, the plugin is already initialized. No additional actions are required.

### <img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2F9BooaofCI33U9Np5oeif%2FFrame%203%20(1).png?alt=media&#x26;token=0750b56a-a069-4759-bda9-29951f06cd30" alt="" data-size="line"> Build

To ensure the plugin works correctly, select the corresponding HTML template. Specify it in the export settings under `Custom HTML Shell`:

```
res://addons/playgama_bridge/template/index.html
```

<figure><img src="https://1088849411-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5ukgSPDBOdbQp4FYtbz1%2Fuploads%2FmJRYfT0yvnSdCglpFO5n%2FScreenshot%202024-10-17%20at%204.38.38%E2%80%AFPM.png?alt=media&#x26;token=738fff42-7ddf-49de-a553-b82882c52170" alt=""><figcaption></figcaption></figure>
