1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

 Unityで Google AdManagerの広告をGMA(GoogleMobileAds)で表示する方法 

Posted at

概要

https://developers.google.com/admob/unity/start?hl=ja
Admobの仕様は上記の通りで詳しい実装方法も記載してある。(2019年12月時点)
AdmanagerはどうやってGMA使って出すんだろ〜って思ったので・・・

調査

「アプリで AdMob ではなくアド マネージャーを使用している場合は、[Google Ad Manager] セクションの [Enabled] チェックボックスをオンにして、アド マネージャーを有効にします。」
と記載があるのでUnityのAdmob用パッケージで同処理ができるみたい。

とりあえず下記のAdmanagerにチェック入れました。Admobの広告と共存できるのでAdmobにもチェック入れても平気です

スクリーンショット 2019-12-20 15.42.41.png

実装サンプル

C#
MobileAds.Initialize(initStatus =>
{
    this.bannerView = new BannerView("{広告ユニットID}", AdSize.Banner, AdPosition.Top);

    // Show Bannar.
    this.bannerView.LoadAd(this.CreateAdRequest());
});

感想・備考

直感的にわかる事なんですが、DemoScriptを見るとAdmobのAppIDを渡してInitしてるんですよね。
でもAdmanager単体なら、AppIDいらないんです。初期化して、ユニットIDだけ渡せばいいんです。

いじょー

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?