前提・実現したいこと
iOSアプリ開発において、Unityで作成したアプリ内にインタースティシャル広告を表示させたいのですが、まったく表示されません。
4時間くらい試行錯誤していますが上手くいきません
どなたか教えていただけないでしょうか。よろしくお願いいたします。
エラー表示はありませんでした。
//C# using System.Collections; using System.Collections.Generic; using UnityEngine; using GoogleMobileAds.Api; public class interstcel : MonoBehaviour { private InterstitialAd interstitial; private float num = 0; void Start() { // 起動時にインタースティシャル広告をロードしておく RequestInterstitial(); interstitialShow(); } public void interstitialShow() { if (interstitial.IsLoaded())//※注釈 { interstitial.Show(); num = 0; } else { if (num <= 10) { Invoke("interstitialShow", 0.2f); num++; } } } private void RequestInterstitial() { #if UNITY_ANDROID string adUnitId = "ca-app-pub-3940256099942544/1033173712";//テスト用 #elif UNITY_IPHONE string adUnitId = "ca-app-pub-3940256099942544/4411468910";//テスト用 #else string adUnitId = "unexpected_platform"; #endif // Initialize an InterstitialAd. interstitial = new InterstitialAd(adUnitId); } }
試したこと
バナー広告(テスト用)では表示できました。
また、作成中のアプリは横向きなのですが、インタースティシャル広告では横向き用のスクリプトや手順など、縦型とは別の設定があるのでしょうか。
※注釈
ここのコードは以下のURL先を参照しました。
広告が表示されないときに確認
http://mediamonster.blog.fc2.com/blog-entry-45.html
補足情報(FW/ツールのバージョンなど)
環境
Unity 2018.1
xcode 9.3.1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/05/30 12:10
2018/05/30 14:56 編集
2018/06/03 10:49