Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.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# AdColony集成错误(错误,未设置特定于平台的实现)_C#_Unity3d_Adcolony - Fatal编程技术网

C# AdColony集成错误(错误,未设置特定于平台的实现)

C# AdColony集成错误(错误,未设置特定于平台的实现),c#,unity3d,adcolony,C#,Unity3d,Adcolony,在实现adcolony的sdk时,我在unity中遇到了一个错误。我附上了一个显示错误的截图。 由于unity中的平台设置是iOS,我在mac上开发,并且unity播放器未激活时没有错误,因此我似乎无法找出问题所在。我真的需要帮助 你好请首先添加引发错误的代码,您的AdManager.start()嗨,我已经用代码更新了帖子 void Start(){ if (!CUtils.IsBuyItem() && !CUtils.IsAdsRemoved()) {

在实现adcolony的sdk时,我在unity中遇到了一个错误。我附上了一个显示错误的截图。 由于unity中的平台设置是iOS,我在mac上开发,并且unity播放器未激活时没有错误,因此我似乎无法找出问题所在。我真的需要帮助


你好请首先添加引发错误的代码,您的AdManager.start()嗨,我已经用代码更新了帖子
void Start(){
    if (!CUtils.IsBuyItem() && !CUtils.IsAdsRemoved())
    {
        RequestBanner();
        RequestInterstitial();
    }

    ConfigureVideoAds();
    RegisterForAdsCallbacks();
}

private void ConfigureVideoAds()
{
    appOptions.UserId = "";
    appOptions.AdOrientation = AdColony.AdOrientationType.AdColonyOrientationAll;

    string[] zoneIds = new string[] { iOSRewardedVideoID, iOSRewardedVideoID };

    AdColony.Ads.Configure(iOSAppKey, appOptions, zoneIds);
}


void RegisterForAdsCallbacks(){
    AdColony.Ads.OnRequestInterstitial += (AdColony.InterstitialAd ad) =>
    {
        _videoAd = ad;
    };

    AdColony.Ads.OnExpiring += (AdColony.InterstitialAd ad) =>
    {
        AdColony.Ads.RequestInterstitialAd(ad.ZoneId, null);
    };

    AdColony.Ads.OnRewardGranted += (string zoneId, bool success, string name, int amount) =>
    {
    };
}