kou0713
@kou0713

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Unity 初心者 admob

admobで広告をつけるときに使うスクリプトです。公式サイト引用https://developers.google.cn/admob/unity/banner?hl=ja

この三点リーダ2箇所は何を省略していて、何を書けばいいのでしょうか?

using System;
using UnityEngine;
using GoogleMobileAds.Api;
...
public class GoogleMobileAdsDemoScript : MonoBehaviour
{
private BannerView bannerView;
...
public void Start()
{
// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize(initStatus => { });

    this.RequestBanner();
}

private void RequestBanner()
{
    #if UNITY_ANDROID
        string adUnitId = "ca-app-pub-3940256099942544/6300978111";
    #elif UNITY_IPHONE
        string adUnitId = "ca-app-pub-3940256099942544/2934735716";
    #else
        string adUnitId = "unexpected_platform";
    #endif

    // Create a 320x50 banner at the top of the screen.
    this.bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
}

}

0

No Answers yet.

Your answer might help someone💌