Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/256.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 测试游戏时未显示Unity广告_C#_Ios_Unity3d_Ads - Fatal编程技术网

C# 测试游戏时未显示Unity广告

C# 测试游戏时未显示Unity广告,c#,ios,unity3d,ads,C#,Ios,Unity3d,Ads,我在Unity工作了两个多月。我对Unity广告有疑问。 这是我的代码: using UnityEngine; using System.Collections; using UnityEngine.Advertisements; public class myAds : MonoBehaviour { void Start () { Advertisement.Initialize ("1017331", true); StartCoro

我在Unity工作了两个多月。我对Unity广告有疑问。 这是我的代码:

using UnityEngine;
using System.Collections;
using UnityEngine.Advertisements;

public class myAds : MonoBehaviour 
{
    void Start () 
    {
        Advertisement.Initialize ("1017331", true);

        StartCoroutine (ShowAdWhenReady());
    }

    IEnumerator ShowAdWhenReady()
    {
        while (!Advertisement.IsReady())
            yield return null;

        Advertisement.Show ();
    }
}
我只为广告制作了一个新场景,每次我失败时,我都会用->Application.LoadLevel(“广告场景名称”)在“丢失”脚本中调用广告

现在,显示屏上显示“这将是您的广告单元”。当游戏进入App Store/Google Play时,会出现真实的广告吗? 我通过Unity Remote 4测试了我的游戏,我的显示器上显示了相同的信息