Skip to main content

Godot

Funox supports Godot 3.x and Godot 4.x HTML5 exports via a plugin.

Install

  1. Download the latest Funox Godot plugin from the Developer Portal.
  2. Copy the folder to res://addons/funox/.
  3. In Project Settings → Plugins, enable Funox.

Initialize

Godot 4.x

GDScript5 lines
1extends Node2 3func _ready() -> void:4    await Funox.is_initialised_async()5    print("Funox SDK ready")

Godot 3.x

GDScript5 lines
1extends Node2 3func _ready() -> void:4    yield(Funox.is_initialised_async(), "completed")5    print("Funox SDK ready")

Lifecycle

GDScript5 lines
1Funox.game_gameplay_start()2Funox.game_gameplay_stop()3Funox.game_loading_start()4Funox.game_loading_stop()5Funox.game_happytime()

Video ads

GDScript5 lines
1Funox.ad_request_midgame(2    func(): AudioServer.set_bus_mute(0, true),3    func(): AudioServer.set_bus_mute(0, false),4    func(err): AudioServer.set_bus_mute(0, false)5)

Rewarded:

GDScript5 lines
1Funox.ad_request_rewarded(2    func(): pause_game(),3    func(): resume_game() ; grant_reward(),4    func(err): resume_game()5)

Save data

GDScript4 lines
1Funox.data_set_item("highScore", "12450")2var score := Funox.data_get_item("highScore")3if Funox.data_has_key("highScore"):4    print("found:", score)

User accounts

GDScript6 lines
1var user = await Funox.user_get_async()2if user == null:3    user = await Funox.user_show_auth_prompt_async()4 5var token := await Funox.user_get_token_async()6# send to backend

Export settings

  • Export template: HTML5
  • Compress (gzip): on
  • Threads support: off (compatibility) unless your target audience has it
  • Splash screen: disabled

Notes

  • Godot's GDScript is single-threaded — keep _process work light.
  • Use ResourcePreloader to keep first frame fast.