Closed DanesZalor closed 2 years ago
Ah nevermind, the admob.cs
I was using didn't appear to connect the signals so i edited the .cs file
by adding this function
public void connect_signals(){
_admob_singleton.Connect("on_admob_ad_loaded", this, "_on_admob_ad_loaded");
_admob_singleton.Connect("on_admob_banner_failed_to_load", this, "_on_admob_banner_failed_to_load");
_admob_singleton.Connect("on_interstitial_failed_to_load", this, "_on_interstitial_failed_to_load");
_admob_singleton.Connect("on_interstitial_loaded", this, "_on_interstitial_loaded");
_admob_singleton.Connect("on_interstitial_close", this, "_on_interstitial_close");
_admob_singleton.Connect("on_rewarded_video_ad_loaded", this, "_on_rewarded_video_ad_loaded");
_admob_singleton.Connect("on_rewarded_video_ad_closed", this, "_on_rewarded_video_ad_closed");
_admob_singleton.Connect("on_rewarded", this, "_on_rewarded");
_admob_singleton.Connect("on_rewarded_video_ad_left_application", this, "_on_rewarded_video_ad_left_application");
_admob_singleton.Connect("on_rewarded_video_ad_failed_to_load", this, "_on_rewarded_video_ad_failed_to_load");
_admob_singleton.Connect("on_rewarded_video_ad_opened", this, "_on_rewarded_video_ad_opened");
_admob_singleton.Connect("on_rewarded_video_started", this, "_on_rewarded_video_started");
}
and calling it on init()
private bool init()
{
if (Engine.HasSingleton("GodotAdMob"))
{
GD.Print("GetInstanceId() ", GetInstanceId());
_admob_singleton = Engine.GetSingleton("GodotAdMob");
_admob_singleton.Call(
"initWithContentRating",
is_real,
GetInstanceId(),
child_directed,
is_personalized,
max_ad_content_rate
);
connect_signals();
return true;
}
return false;
}
Godot 3.4.3 Mono
AdMob Plugin version: 5.1.0
Admob signals are not emitting:
My code
the
from admob.cs
show_rewarded_video()
works as the test ad plays, and logcat showsAdmob: onRewardedVideoAdClosed
but it doesnt call my connected function, or even print this:adb logcat