Skip to content

Methods

Intermission extends Node. Every method returns at once. Answers arrive as signals.

func available() -> bool

True when the Android plugin is in this build. False in the editor, on other platforms, and in an Android build without the plugin. When it is false, every request fails with AdError.NOT_AVAILABLE on the next frame.

func initialize(app_key: String, test_mode: bool = false) -> void

Starts LevelPlay with your app key. Answers with initialized. In test mode every ad comes from LevelPlay’s demo app, and app_key may be empty. See Test mode. Calling it again after it succeeded answers initialized(true) again, and after a failure it tries again.

func is_initialized() -> bool

True once initialize has succeeded.

func is_test_mode() -> bool

True when the plugin was initialized in test mode.

func sdk_version() -> String

LevelPlay’s version, such as "9.8.0", or empty when available() is false.

Call these before initialize, and again whenever the player changes their choice. See Consent.

func set_gdpr_consent(granted: bool) -> void

Consent for personalised ads where the GDPR applies.

func set_us_privacy_opt_out(opted_out: bool) -> void

A US player’s choice not to have their data sold or shared.

func set_child_directed(child: bool) -> void

For apps, or players, directed at children.

See Full-screen ads.

func load_ad(format: Format, ad_unit_id: String) -> void

Loads one interstitial (Format.INTERSTITIAL) or rewarded (Format.REWARDED) ad for the ad unit. Answers with ad_loaded or ad_failed_to_load. A load asked for before initialize has finished waits for it.

func is_ad_ready(ad_unit_id: String) -> bool

True when an ad is loaded for the ad unit and not yet shown.

func show_ad(ad_unit_id: String, placement: String = "") -> void

Shows the ad loaded for the ad unit. Answers with ad_shown or ad_failed_to_show, then ad_closed. placement names the moment in LevelPlay’s reports, and may be empty.

See Banners.

func load_banner(ad_unit_id: String, size: BannerSize = BannerSize.BANNER, placement: String = "") -> void

Loads a banner, hidden until show_banner. Loading another replaces it. Answers with banner_loaded or banner_failed_to_load, and banner_loaded again after every refresh.

func show_banner(anchor: Anchor = Anchor.BOTTOM, margin_dp: float = 0.0) -> void

Shows the banner centred at the top or the bottom of the screen, margin_dp in from that edge.

func hide_banner() -> void

Hides the banner. A hidden banner does not refresh.

func destroy_banner() -> void

Removes the banner.

func set_overlong_seconds(seconds: float) -> void

Turns on ad_overlong for full-screen ads still up after seconds. Off (0) by default. See Misbehaving ads.

func open_test_suite() -> void

Opens LevelPlay’s Integration Test Suite, in a debug build or in test mode, once initialized. Elsewhere it does nothing. See Test mode.

Intermission is an open source Godot plugin under the MIT licence, one of the toolsmade by Chaosmos. It is not sponsored by or affiliated with Unity Technologies or the Godot Foundation.