1

Unity でモバイル ゲームを作成しており、収益化のために UnityAds を使用する予定です。アセットストアから「Unity Monetization 3.1.0」パッケージをインポートしました。ユニティで実行すると、すべてが機能しているように見えますが、ビルドして Android フォンでテストしても何も起こりません。

これは私のコードです:

    private void Start()
    {
        Advertisement.Initialize(gameId);
        StartCoroutine(ShowBannerWhenReady());
    }

    private IEnumerator ShowBannerWhenReady()
    {
        while (!Advertisement.IsReady(bannerId)) yield return null;
        Advertisement.Banner.Show(bannerId);
    }

編集:

ログは次のとおりです。

07-18 03:37:02.222 10741 10761 D UnityAds: com.unity3d.services.core.misc.Utilities.writeFile() (line:127) :: Wrote file: /data/user/0/com.noname.minigame01/files/UnityAdsStorage-public-data.json
07-18 03:37:02.223 10741 10761 D UnityAds: com.unity3d.services.core.device.Storage.sendEvent() (line:81) :: Couldn't send storage event to WebApp
07-18 03:37:02.226 10741 10761 D UnityAds: com.unity3d.services.core.misc.Utilities.writeFile() (line:127) :: Wrote file: /data/user/0/com.noname.minigame01/files/UnityAdsStorage-public-data.json
07-18 03:37:02.226 10741 10761 D UnityAds: com.unity3d.services.core.device.Storage.sendEvent() (line:81) :: Couldn't send storage event to WebApp
07-18 03:37:02.228 10741 10761 D UnityAds: com.unity3d.services.ads.UnityAdsImplementation.initialize() (line:47) :: ENTERED METHOD
07-18 03:37:02.253 10741 10761 D UnityAds: com.unity3d.services.UnityServices.initialize() (line:41) :: ENTERED METHOD
07-18 03:37:02.253 10741 10761 I UnityAds: com.unity3d.services.UnityServices.initialize() (line:79) :: Initializing Unity Services 3.1.0 (3100) with game id XXXXXXX in production mode
07-18 03:37:02.258 10741 10761 I UnityAds: com.unity3d.services.UnityServices.initialize() (line:90) :: Unity Services environment check OK
07-18 03:37:02.292   663 10818 I netd    : ;; res_nquery(config.unityads.unity3d.com, 1, 1)
07-18 03:37:02.378   663 10818 I netd    : ;; res_nquery(config.unityads.unity3d.com., 1, 1)
07-18 03:37:02.464 10741 10817 E UnityAds: com.unity3d.services.ads.configuration.AdsModuleConfiguration$1.run() (line:60) :: Couldn't get address. Host: config.unityads.unity3d.com: Unable to resolve host "config.unityads.unity3d.com": No address associated with hostname: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
07-18 03:37:02.464 10741 10816 I UnityAds: com.unity3d.services.core.configuration.InitializeThread$InitializeStateConfig.execute() (line:191) :: Unity Ads init: load configuration from https://config.unityads.unity3d.com/webview/3.1.0/release/config.json
4

1 に答える 1