googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.38k stars 1.08k forks source link

Mediation with Unity Ads 2.0 #261

Closed Russel1 closed 8 years ago

Russel1 commented 8 years ago

Hi,

is it possible to use UnityAds 2.0 with googleads-mobile-unity mediation? https://github.com/Unity-Technologies/unity-ads-android/releases

Is the adapter outdated?

I get this error now:

08-18 17:53:50.059: W/Ads(8744): Fail to instantiate adapter com.google.ads.mediation.unity.UnityAdapter 08-18 17:53:50.059: W/Ads(8744): at com.google.android.gms.ads.internal.mediation.client.d.a(:com.google.android.gms.DynamiteModulesA:94) 08-18 17:53:50.059: W/Ads(8744): at com.google.android.gms.ads.internal.reward.c.b(:com.google.android.gms.DynamiteModulesA:215) 08-18 17:53:50.059: W/Ads(8744): at com.google.android.gms.ads.internal.reward.mediation.h.a(:com.google.android.gms.DynamiteModulesA:1108) 08-18 17:53:50.059: W/Ads(8744): at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.DynamiteModulesA:19) 08-18 17:53:50.059: W/Ads(8744): at com.google.android.gms.ads.internal.util.u.call(:com.google.android.gms.DynamiteModulesA:1055) 08-18 17:53:50.059: W/Ads(8744): at com.google.android.gms.ads.internal.util.v.run(:com.google.android.gms.DynamiteModulesA:75)

ericleich commented 8 years ago

Hi Russel,

First of all, that error indicates that you don't have the Unity adapter as part of your app. For mediation to work, you need to get the UnityAds adapter from here and include it in your app per these instructions. You need to repeat this process for each ad network you want to integrate, in addition to including that ad network's SDK into your project.

Having said that, the UnityAds adapter supports the latest stable UnityAds SDK, which is currently 1.5.8. According to Unity's site, UnityAds 2.0 SDK is still in beta. In order to avoid having to maintain multiple integrations of the adapter, we won't update the UnityAds adapter to use UnityAds 2.0 SDK until it is out of beta. So right now, you'll need UnityAds 1.5.8 SDK.

One final note, updating the UnityAds adapter is out of scope of the Google Mobile Ads Unity plugin. The flow of the an ad request to UnityAds is:

Your Unity code -> Google Mobile Ads Unity Plugin -> Google Mobile Ads SDK -> UnityAds adapter -> UnityAds SDK

The versioning issue is at the UnityAds adapter -> UnityAds SDK level. Once UnityAds SDK is out of beta and the UnityAds adapter is updated, you can start using those libraries in your project without needing to update the Unity plugin or change your Unity code. Because of this, I'm going to close this issue on GitHub. Please reach out to the Google Mobile Ads SDK developer forum once UnityAds SDK 2.0 is out of beta, or for adapter questions in general.