Godot AdMob - Banner Ads
SkillDev toolsProvides instructions to implement, load, and destroy banner ads (AdView) using custom or adaptive sizes in GDScript and C#. Use when integrating banner ads.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Godot AdMob - Banner Ads skill
What this skill tells your AI
The instructions your AI receives, as published by poingstudios/godot-admob-plugin in platforms/godot_editor/addons/admob/skills/godot-admob-banner/SKILL.md and read by ahel’s review.
Assists with implementing, displaying, and destroying banner ads using the AdView and AdSize classes in Godot 4.x.
Banner Ads Workflow
- Define and Instantiate AdView: Create an
AdViewwith your Ad Unit ID, selectedAdSize, and screenAdPosition. - Configure AdListener: Set up an
AdListenerto respond to events such ason_ad_loaded,on_ad_failed_to_load, etc. - Load the Ad: Call
ad_view.load_ad(AdRequest.new()). - Crucial: Destroy the Ad: Call
ad_view.destroy()inside_exit_tree()or when changing scenes to free memory.
Code Examples
=== "GDScript"
```gdscript
var ad_view: AdView
func load_banner_ad() -> void:
var ad_unit_id := "ca-app-pub-3940256099942544/6300978111" # Test ID
var ad_size := AdSize.get_current_orientation_anchored_adaptive_banner_ad_size(AdSize.FULL_WIDTH)
var ad_position := AdPosition.BOTTOM
ad_view = AdView.new(ad_unit_id, ad_size, ad_position)
var listener := AdListener.new()
listener.on_ad_loaded = func() -> void:
print("Banner loaded successfully.")
listener.on_ad_failed_to_load = func(error: LoadAdError) -> void:
print("Banner failed to load: ", error.message)
ad_view.ad_listener = listener
# To request a collapsible banner:
# var request := AdRequest.new()
# request.extras = {"collapsible": "bottom"}
# ad_view.load_ad(request)
ad_view.load_ad(AdRequest.new())
func _exit_tree() -> void:
if ad_view:
ad_view.destroy()
ad_view = null
```
=== "C#"
```csharp
using Godot;
using PoingStudios.AdMob.Api;
using PoingStudios.AdMob.Api.Listeners;
using PoingStudios.AdMob.Api.Core;
private AdView _adView;
public void LoadBannerAd()
{
string adUnitId = "ca-app-pub-3940256099942544/6300978111"; // Test ID
var adSize = AdSize.GetCurrentOrientationAnchoredAdaptiveBannerAdSize(AdSize.FullWidth);
var adPosition = AdPosition.Bottom;
_adView = new AdView(adUnitId, adSize, adPosition);
var listener = new AdListener();
listener.OnAdLoaded = () => GD.Print("Banner loaded successfully.");
listener.OnAdFailedToLoad = (error) => GD.Print($"Banner failed to load: {error.Message}");
_adView.AdListener = listener;
_adView.LoadAd(new AdRequest());
}
public override void _ExitTree()
{
if (_adView != null)
{
_adView.Destroy();
_adView = null;
}
}
```
Signals
- GitHub stars
- 616
- Forks
- 50
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
godot-admob-banner- Source
- github.com/poingstudios/godot-admob-plugin