Mediate Unity Ads in Mopub

mopub
ads
unity

#1

Hello,

We’ve been using Mopub for mediating fullscreen ads for sometime now, and recently decided to add Unity Ads into it. The setup went well, we can see the Unity Ads got selected in debug url of Mopub, but the ads couldn’t be displayed on devices. Here is the error in logcat

Attempting to invoke custom event: UnityAdsMopubEvent
Couldn't locate or instantiate custom event: UnityAdsMopubEvent.
MoPubErrorCode: Unable to find Native Network or Custom Event adapter.

We’re using latest mopub sdk (4.7.1 for now), and have added plugin for Unity Ads.


#2

Hello, mopub’s staff in here?


#3

Hello TnG2903,
I’ve run into the same problem. Could you figure this out? (I’m using mopub sdk 4.9.0).


#4

well hello there,

It’s been a tough run, but we’ve traced that in order to mediate ads in mopub, you must set up the class name from mopub’s server side here:
https://github.com/Applifier/unity-ads/tree/master/mopub

But please be warned, there is a little problem with this fix. Unity Reward Video will not show up if you chose to mediate Fullscreen ads by mopub :D.


#5

Hi all,

Thanks for reaching out!

The following error code indicates that the adapter file for the network is missing, renamed or in the wrong place.

MoPubErrorCode: Unable to find Native Network or Custom Event adapter.

Android
For Android, the adapters should be placed in the com.mopub.mobileads folder for all formats except native. For native, they should be placed in the com.mopub.nativeads folder. Full instructions are detailed here.

For the custom event class field in the MoPub UI, you will want to enter the location of the adapter. For example, a publisher mediating Unity Ads would enter the following into the custom event class field of the MoPub UI: com.mopub.mobileads.UnityRewardedVideo

iOS
For iOS, the adapter files can be found in the Ad Network Support folder. Full integration details are outlined here.

For the custom event class field in the MoPub UI, you will want to enter the name of the adapter. For example, a publisher using Unity Ads Rewarded Video would enter the following into the custom event class field of the UI: UnityAdsRewardedVideoCustomEvent

Unity Engine
For Unity Engine, you will need to follow the instructions outlined in our Unity documentation to include the adapter file. This entails adding the correct .unitypackage file to your project.

For the custom event class field in the MoPub UI, follow the instructions outlined above for iOS and Android.

If you are still having trouble, please reach out to the MoPub Support Team directly at support@mopub.com. Please make sure to include the full device logs from your testing, your ad unit ID and the email address associated with your account in your email.

Thanks!