Godot
Funox supports Godot 3.x and Godot 4.x HTML5 exports via a plugin.
Install
- Download the latest Funox Godot plugin from the Developer Portal.
- Copy the folder to
res://addons/funox/. - In Project Settings → Plugins, enable Funox.
Initialize
Godot 4.x
1extends Node2 3func _ready() -> void:4 await Funox.is_initialised_async()5 print("Funox SDK ready")Godot 3.x
1extends Node2 3func _ready() -> void:4 yield(Funox.is_initialised_async(), "completed")5 print("Funox SDK ready")Lifecycle
1Funox.game_gameplay_start()2Funox.game_gameplay_stop()3Funox.game_loading_start()4Funox.game_loading_stop()5Funox.game_happytime()Video ads
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:
1Funox.ad_request_rewarded(2 func(): pause_game(),3 func(): resume_game() ; grant_reward(),4 func(err): resume_game()5)Save data
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
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 backendExport 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
_processwork light. - Use
ResourcePreloaderto keep first frame fast.