Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | pferft |
Hi everyone,
I succeeded in installing AdMob based on GitHub - Poing-Studios/godot-admob-android: Godot's AdMob Plugin for Android with support for Mediations.. As I plan to have everything running in the background in the end (so not to display all these buttons and the music etc. of the Example-scene), for testing I built a simple button which sends a signal to the Example node’s Script (res://addons/admob/test/Example.gd).
And it works:
on_Button_released():
MobileAds.show_interstitial()
pops up the test-Interstitial. The remote debugger also prints my
func _on_MobileAds_interstitial_loaded() -> void:
Interstitial.disabled = false
_add_text_Advice_Node("Interstitial loaded")
print ("alright, Interstitial loaded!")
However, this print won’t show:
func _on_MobileAds_banner_loaded() -> void:
DisableBanner.disabled = false
EnableBanner.disabled = true
ShowBanner.disabled = false
HideBanner.disabled = false
_add_text_Advice_Node("Banner loaded")
_add_text_Advice_Node("Banner width: " + str(MobileAds.get_banner_width()))
_add_text_Advice_Node("Banner height: " + str(MobileAds.get_banner_height()))
_add_text_Advice_Node("Banner width in pixels: " + str(MobileAds.get_banner_width_in_pixels()))
_add_text_Advice_Node("Banner height in pixels: " + str(MobileAds.get_banner_height_in_pixels()))
print ("alright, Banner loaded!")
So I guess Banner isn’t loaded?
There are several variables in the Script like EnableBanner.disabled = true
(or false) or MobileAds.load_banner()
and MobileAds.destroy_banner()
and such, and I didn’t touch the code. It appears that by default Banner-loading is turned off, but I can’t figure out which line(s) to tweak in order to change that. (There’s nothing to check/uncheck in the Inspector.)
Maybe someone had the same problem before? Any hint is much appreciated.