Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Usage as global(autoload)
To use the plugin, we instantiate a new node for each "screen/page" scene in our app. It works well if the app is based on manual scene replacement (root nodes are the same across the app), but if we switch the scenes via get_tree().change_scene_to_*
methods it becomes painfully:
- each root scene need it's own Adb node with duplicated initialization
- updating each Adb node across the app
- handling ads loading
Proposed Behavior
Usage as global(autoload)
It will take a light refactor to make it work:
- move
_update_plugin()
call to top ofinitialize
func - move setting of all ads ids from
@ready
to bottom of theinitialize
func
This will save usage of plugin as node and add usage as global with preserving the plugin initialization in the same way by simply calling the initialize
func.
Also I suggest:
-
adding
is_initialized
prop to plugin, to avoid manual managing of the state and having the plugin as the only trust source -
adding to troubleshooting section mandatory manual app name setting, the plugin return load errs with default export name usage (com.example.$genname), despite fully workable app, which leads to ghost hunt
-
add to docs/example that the user should remove manually loaded ads after usage (like rewarded)
-
extend the docs "File-based Export Configuration" section with Att prop to avoid following export errs:
- Сouldn't find the given section "ATT" and key "att_text", and no default was given.
- res://addons/AdmobPlugin/AdmobExportConfig.gd:46 - Trying to assign value of type 'Nil' to a variable of type 'String'.
Alternative Solutions
No response
Godot Version
4.4.1.stable
OS Godot Is Running On
Windows 11
Plugin Version
4.0
OS Plugin Is Running On
Android 14
Anything else?
Your plugin is awesome!