Closed bayu-sw closed 9 months ago
Hi, thank you very much for reporting this bug, it seems like a critical bug and I'm looking for it!
without breaking compatibility 🤔
class_name RewardedAdLoader
#...
func load(
#...
_plugin.connect("on_rewarded_ad_loaded", func(uid : int):
#if uid == _uid:
if uid == _uid and rewarded_ad_load_callback.on_ad_loaded.is_valid():
rewarded_ad_load_callback.on_ad_loaded.call(RewardedAd.new(uid))
)
@bayu-sw should be fixed at https://github.com/Poing-Studios/godot-admob-plugin/releases/tag/v3.1.0 please test it
Godot version
4.1.2
Plugin version
v3.0.0
Phone information
OPPO A78 with Android 13
Issue description
App crash
Steps to reproduce
RewardedAdLoader.new().load(unit_id, AdRequest.new(), rewarded_ad_load_callback)
rewarded_ad_load_callback
callback was calledAdditional context
note: i did use this on the node
but app still crash
I thing it happen because the plugin was trying to call the callback after finishing loading ads but the callback was not there because the node already removed from tree.
My workaround was like this
then in the node call this
The the issue was resolved.
I did not test this on ios or other ad format but i think the issue was there too