Banner

Is Banner Supported

Check if the platform supports displaying banner ads. Use this to determine if you can include banner advertisements in your game.

Bridge.advertisement.is_banner_supported

Show Banner

Display a banner ad within your game to generate revenue through advertising.

var options

match Bridge.platform.id:
    "vk":
        options = {
            "position": "bottom",
            "layoutType": "resize",
            "canClose": false,
        }
    "crazy_games":
        options = {
            "containerId": "div-container-id"
        }
    "game_distribution":
        options = {
            "containerId": "div-container-id"
        }

Bridge.advertisement.show_banner(options)

Hide Banner

Hide the currently displayed banner ad when it is no longer needed.

Bridge.advertisement.hide_banner()

Monitor the state of the banner ad (loading, shown, hidden, failed) to manage its display and troubleshoot issues.

Bridge.advertisement.banner_state

Returns the current state of the banner. Possible values: loading, shown, hidden, failed.

# To track banner state changes, connect to the signal
func _ready():
    Bridge.advertisement.connect("banner_state_changed", self, "_on_banner_state_changed")

func _on_banner_state_changed(state):
    print(state)

Last updated