前提・実現したいこと
Unityでのadmob広告(バナー、リワード)の表示 ※Android Unityバージョン:2018.2.12f1 プラグインのバージョン:不明 調べ方を教えて頂きたいです。 *.jar, *.aarはコピーされています。
発生している問題・エラーメッセージ
広告が表示されない エラーの発生はなし
該当のソースコード
using System.Collections; using System.Collections.Generic; using UnityEngine; using GoogleMobileAds.Api; public class GoogleAds : MonoBehaviour { // Use this for initialization void Start() { // アプリID、 これはテスト用 string appId = "ca-app-pub-3940256099942544~3347511713"; // Initialize the Google Mobile Ads SDK. MobileAds.Initialize(appId); RequestBanner(); } private void RequestBanner() { // 広告ユニットID これはテスト用 string adUnitId = "ca-app-pub-3940256099942544/6300978111"; // Create a 320x50 banner at the top of the screen. BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom); // Create an empty ad request. AdRequest request = new AdRequest.Builder().Build(); // Load the banner with the request. bannerView.LoadAd(request); } // Update is called once per frame void Update() { } }
試したこと
https://freesworder.net/unity-admob-banner/ こちらのサイトを元にバナー広告を実装しましたが、広告が表示されません。 いろんなサイトを見てmanifest.xmlファイルの移動等行いましたがダメでした。 丸3日かけて解決せずお助け願いたいです。
回答2件
あなたの回答
tips
プレビュー