---
title: "Connect with Godot"
description: "Connect a Godot mobile game with GDScript and verify a published Experience on a device."
sidebar:
  label: "Godot"
search:
  tags: ["sdk", "setup", "godot"]
  keywords: ["GDScript", "Godot", "install", "initialize", "integration_test"]
---

The Godot addon displays Nuxie Experiences above your game and provides GDScript APIs for events, purchases, and feature access. Publish or update an onboarding flow or paywall without exporting a new build. Use Godot 4.7.2 with matching export templates, iOS 15+, or Android API 24+.

1. **Installation**

    <span id="install-the-addon" />

    ## Installation [toc]

    From the [Godot SDK checkout](https://github.com/nuxieai/nuxie-godot), prepare the addon on macOS. Install Python 3, Git, JDK 17, Android SDK 36 and its required NDK, Xcode, SCons, and XcodeGen first:

    ```sh title="Prepare the Godot addon"
    python3 scripts/prepare-native.py
    python3 scripts/pack.py
    ```

    Extract `dist/nuxie-godot-0.4.0.zip` so your game contains `addons/nuxie`. Then:

    1. Enable **Nuxie** under **Project → Project Settings → Plugins**. This registers the `Nuxie` autoload.
    2. For Android, install the matching build templates, enable Gradle builds, and select a 64-bit ABI: arm64-v8a or x86_64.
    3. For iOS, enable **NuxieGodot** in the export preset.

    See the [build guide](https://github.com/nuxieai/nuxie-godot/blob/main/docs/integration-guide.md) for native toolchain setup.

    <span id="configure-from-a-startup-node" />

2. **Initialize**

    ## Initialize [toc]

    Copy your app's public keys from **Connect your app**. Use `pk_test_` keys in development builds and `pk_live_` keys in release builds. Keep the default service environment for both; the key selects preview or live content.

    Configure the autoload from a startup Node:

    ```gdscript title="Game startup"
    extends Node

    func _ready() -> void:
        var options := NuxieOptions.new()
        options.ios_api_key = "YOUR_IOS_PUBLIC_KEY"
        options.android_api_key = "YOUR_ANDROID_PUBLIC_KEY"

        var result: NuxieResult = await Nuxie.configure(options)
        if not result.ok:
            push_error(result.error.message)
            return
    ```

    Check `result.ok` before continuing. The autoload stays configured across scene changes.

    <span id="check-the-connection" />

    Run your app on a device or simulator. **Connect your app** shows **Connected** after Nuxie receives a request from the SDK.

    <span id="prepare-the-experience-you-will-test" />
    <span id="add-a-test-trigger" />

3. **Trigger an Experience**

    ## Trigger an Experience [toc]

    [Publish an Experience](/docs/guides/publishing) for this app with the event trigger `integration_test`. Set its re-entry rule to **Every time** if you want to show it repeatedly while integrating. Add this call to a button handler after setup:

    ```gdscript
    var result: NuxieResult = await Nuxie.trigger("integration_test")
    if not result.ok:
        push_error(result.error.message)
    ```

    Tapping the button sends the event. Nuxie displays the Experience when the customer matches its audience and delivery rules. For an existing Experience, replace `integration_test` with its published event name.

    <span id="show-the-experience" />

    **Connect your app** changes to **Shown** after the SDK reports that the Experience appeared. For games, run this in an iOS or Android player or export. Your game controls pause, audio, and input while the Experience is visible.

    <span id="try-a-remote-update" />

4. **Update an Experience**

    ## Update an Experience [toc]

    Edit the Experience and publish your changes. Bring the app back to the foreground to fetch the update, then send the event again with a customer who can re-enter. New Journeys use the updated version; a Journey already in progress keeps the version it started with. The app code stays the same.

    <span id="continue" />

    See the [SDK reference](/docs/reference/godot) for identity, feature access, and App Actions. [Delivery](/docs/guides/delivery) explains trigger and audience configuration.
