Search Unity

Mobile Ads - Simple way to integrate ads in your app

Discussion in 'Assets and Asset Store' started by GleyGames, May 1, 2018.

?

What other advertisers we should add to our plugin?

Poll closed Oct 21, 2019.
  1. Facebook Ads

    64.7%
  2. AppLovin

    34.1%
  3. Tapjoy

    10.6%
  4. MoPub

    15.3%
  5. LeadBolt

    7.1%
  6. ironSource

    20.0%
  7. inMobi

    8.2%
  8. Mobusi

    0 vote(s)
    0.0%
  9. Appnext

    2.4%
  10. Appodeal

    8.2%
Multiple votes are allowed.
  1. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    Hi,

    what's the latest Heyzap sdk (fyber)?
    I installed FairBid-Unity-SDK-3.1.0 but it doesn't work, for example it doesn't find using Heyzap; in CustomHeyzap and other errors

    The link of gley setting (download heyzap sdk) not work

    thanks
     
  2. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Heyzap was an old advertising and mediation platform that is now deprecated and it does not work. We kept it there for the old users that are using the package. It will be removed in our future releases.
     
  3. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    Yes, HeyZap was acquired by Fyber
    and it looks like a great alternative tool to Admob
    https://dev-unity.fyber.com/docs/integration
    so you won't support Fyber?
     
  4. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    We plan to do that, be we have been very busy this period with other projects so we din not managed to add Fyber support. It is on our to do list but i can`t offer you a timeline.
     
  5. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    [QUOTE = "GleyGames, post: 5800645, membro: 961345"] Abbiamo in programma di farlo, visto che in questo periodo siamo stati molto impegnati con altri progetti, quindi non siamo riusciti ad aggiungere il supporto Fyber. È nella nostra lista delle cose da fare, ma non posso offrirti una sequenza temporale. [/ QUOTE]

    thanks
     
  6. rburns50

    rburns50

    Joined:
    Apr 16, 2016
    Posts:
    13
    New issue having used this for some time - Unity 2019.3.13f1, Google AdMob 5.10 and Unity Ads 3.4.5. Imported Mobile Ads (latest update) and immediately get "Settingswindows.cs (121,25) error CS0234 the type or namespace name "GleyAdmobPatch" does not exist in the namespace GoogleMobileAds.Editor. I have deleted everything and tried importing from scratch but continue to get this error! Any ideas please - first time had an issue with this and been using for some time.
     
  7. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    This issue is related to the latest Admob SDK with removes the ability to make the automated settings like before.
    Please open our settings window, check Admob and hit save and your issue should go away.

    If not please install this packages located here:
    \Assets\GleyPlugins\Ads\Patches\AdmobPatch.unitypackage

    That package should be installed automatically when hit save, but it seems is not.
     
    mimiyoki likes this.
  8. rburns50

    rburns50

    Joined:
    Apr 16, 2016
    Posts:
    13
    - Thank you yes, seems patch hadnt loaded but all good now :)
     
    GleyGames likes this.
  9. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    69
    Hello. AdMob doesn't work on Android. I did everything according to the instructions. Returns an error:
    upload_2020-5-18_14-12-20.png

    But at the same time, I specified the correct AppID everywhere:
    upload_2020-5-18_14-13-51.png
    upload_2020-5-18_14-14-29.png upload_2020-5-18_14-15-7.png upload_2020-5-18_14-20-20.png
     
  10. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    69
    upload_2020-5-18_14-23-16.png
    Unity 2020.1.0b
     
  11. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Unity 2020 is still in beta. Honestly I am not even capable to resolve android dependencies for Admob in Unity 2020.1.8b in an empty project. Congratulations for being able to build it.
    Capture.JPG

    An yes, your app ID is integrated correctly but you still getting that error. You should write to Admob to make their plugin compatible with 2020.1. But I think they are also waiting for a stable version of Unity in order to make the required fixes.

    As a suggestion, please do not ship your game with a beta version of Unity, use the latest Unity 2019 version available which is very stable and reliable.

    Also if you are not able to see live ads please make sure you app is signed with your release key, and your payment details are filled inside your Admob account.
     
  12. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    69
    GleyGames

    Thanks for the answer! I set 2020 to get new functionality. I'll try to put 2019 on and check there.
     
  13. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    If you are having problems in 2019 send me an e-mail at gley.assets@gmail.com and I will provide you a full working project with Admob already integrated. Don`t forget to specify your invoice number inside your e-mail.
    Thank you!
     
  14. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    69
    Yes, changing the Unity version to 2019 helped! Tell me if I opened your test scene .
    Writes:
    upload_2020-5-18_17-42-45.png
    Do I understand correctly that everything works? I will need to sign the app and that's it?
     
  15. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Yes, if you sign your app with your release key you should receive live ads.
     
  16. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    47
    Hi, Thanks for this great plugin. I used it in many projects and quite happy with its features. I have a question.

    Is it possible to load ads which are immediatly necessary. For example if I use facebook ads, unity ads, admob, vungle all together and if I choose order mediation, is it possible to make these ad requests in order to save bandwidth and cpu use? I want to load only facebook ads and show them, when facebook not available I want to load unity ads show them. If I am not mistaken currently all network requests related to advertisement networks are executed when plugin is loaded. I want to make these requests when they are necessary because when a lot of advertesiment networks activated, first a few minutes/seconds of game being sluggish because of network request processing.
     
  17. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    We will think about that option, but not all advertisers have failed callbacks so it is a little tricky to implement that, but we will consider it. Thank you for the suggestion.
     
    r137 likes this.
  18. Flight648

    Flight648

    Joined:
    Apr 5, 2020
    Posts:
    7
    Hi GleyGames,

    Thanks for the nice asset, but I ran into a problem with Vungle, here is a screenshot from the console:

    vungle_issue.png

    Can you please help me with this issue?
     
  19. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Please import the latest vungle SDK.
    Also here is a complete project with all advertisers already integrated, you can check it:
    https://github.com/gleygames/MobileAds2019
     
  20. Flight648

    Flight648

    Joined:
    Apr 5, 2020
    Posts:
    7
    Thanks for the answer, it seems something went wrong for some reason after I imported Vungle SDK adapter. But now everything works.
     
    Last edited: Jul 16, 2020
  21. Flight648

    Flight648

    Joined:
    Apr 5, 2020
    Posts:
    7
    I keep fighting with Vungle and now I've got this error:

    error.png

    It seems there is some duplicated stuff somewhere, but I the problem is that I'm very new to Unity, could you please point me where the issue is coming from?

    Thanks.
     
  22. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    I already posted the link to the repository with all advertisers already integrated, please compare that project with yours and see what is wrong. you can export the Vungle SDK from there because all duplicates ware fixed.
    It looks like your problem is inside manifest files, they have different orientation set up. Also inside your console you will see exactly what duplicate file you have.
     
  23. Rorep

    Rorep

    Joined:
    Nov 23, 2013
    Posts:
    10
    Hello, I love the way your API is clean and simple, but it's missing some getters.

    I think to be GDPR compliant. The user must have the option to change their User Consent status after they initially set it. So I need to know if User Consent was given or not.

    The following methods work fine:
    Advertisements.Instance.UserConsentWasSet();

    Advertisements.Instance.SetUserConsent(true);


    But the following method I need doesn't exist:
    Advertisements.Instance.GetUserConsent();


    My workaround is this:
    Advertisements.Instance.GetConsent("UserConsent"));


    I don't have access to:
    private const string userConsent = "UserConsent";


    So the following method should be added to the Advertisements class:
    Code (CSharp):
    1.     public UserConsent GetUserConsent()
    2.     {
    3.         if (!UserConsentWasSet())
    4.             return UserConsent.Unset;
    5.         return GetConsent(userConsent);
    6.     }

    We should do the same for CCPAConsent:
    Code (CSharp):
    1. public UserConsent GetCCPAConsent()
    2. {
    3.     if (!UserConsentWasSet())
    4.         return UserConsent.Unset;
    5.     return GetConsent(ccpaConsent);
    6. }
     
    Last edited: Jul 21, 2020
  24. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Thank you for signaling the problem. The get consent method is public inside our API, but our filenames are not. In our next update will fix this and make that method usable.
     
  25. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    r137 likes this.
  26. Flight648

    Flight648

    Joined:
    Apr 5, 2020
    Posts:
    7
    Hello,

    I've got a question about percent mediation, does it support the same logic as the order mediation in case there are no available ads from the current network?

    I mean if I split for example impressions between 2 networks 50:50 and one of them currently has no ads to serve, so then 100% impressions will go to the another one or half of them will be not shown?
     
  27. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Sorry for the late replay, I replayed yesterday but is seems it was not posted.
    If you select percent mediation, the mediation percent is only computed from available ads. If an ad network has no ad available it will net be selected in mediation process. So even a network with 1% weight will be shown if the other ones do not have ads available. I hope this answered your question
     
  28. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    75
    I also came here looking for more info on that topic, because i'm seeing a low show rate with admob. So based on your answer, it sounds like mediation is the solution, but i have some follow-up questions.

    The first additional network i want to add is unity ads, but i don't want to show users a consent popup. If i set consent to false after initializing, but before calling for an ad, will that prevent the unity ads consent popup?

    If not, perhaps i could solve this by adding unity ads as a mediation network in admob. Would it then apply the consent i set for admob to the unity ads that are now coming through admob?

    Also, if i go that route, do i need to add the unity ads sdk to my project? Some of your previous comments in this thread seem to imply that i would only need the admob sdk, which makes sense to me, and seems like it would save me from increasing the size of my app. However, the google webpage about mediation says "Update your app to include the third-party ad network's SDK, and an adapter library that communicates between Google and the third-party ad network to request and serve ads."

    That makes it sound like i do still need the sdk of each network. If that's true, then i don't see the point in mediating through admob, unless it's the only way to prevent the unity ads consent popup.

    Thanks
     
  29. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    If you do not need the consent popup just do not call it and it will not be shown using our asset.

    About mediation, if you want to mediate through Admob, you do not need the Unity SDK but you need the Admob adapter for Unity that is essentially the Unity SDK but with some changed made by Admob guys.
    Mediation through Admob has the advantages that you can make advanced configurations using ecpm metric that is not possible using in app mediation.

    Hope this answered your questions.
     
  30. blevok

    blevok

    Joined:
    Feb 16, 2017
    Posts:
    75
    Wow thanks for the fast response. I didn't realize the adapter was different from the normal admob sdk.
    I'm confused about one thing though. Your documentation says this:
    That sounds like it would happen without calling it. So are you saying it won't ask if i already used your consent function to set it?
     
  31. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    In our plugin we automatically set a value for the consent, if you do not show the popup before initialize, our plugin automatically initialize that with false so unity never shows their built in popup because the value was already set at first ad shown. We said that in general to make people aware of what they should do, because we launch the ad sdk exactly when the EU law was given.
     
    blevok likes this.
  32. diggyk

    diggyk

    Joined:
    Aug 16, 2014
    Posts:
    24
    Hey guys!

    I've been using with Admob and it's been working fine. Now I just added Unity Ads but XCode crashes (this is an iOS build).

    It crashes on:
    ```
    id ufw = UnityFrameworkLoad();
    [ufw runUIApplicationMainWithArgc: argc argv: argv]; <=== crash here
    return 0;
    ```

    This is called by the `UnityAdsSetting_Get_Custom_PropTestMode()`
     
  33. diggyk

    diggyk

    Joined:
    Aug 16, 2014
    Posts:
    24
    I figured it out. I had not properly installed all the Unity Services from the Services panel.
     
  34. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Glad you managed to solve your problem.
     
  35. Flight648

    Flight648

    Joined:
    Apr 5, 2020
    Posts:
    7
    Hi GleyGames,

    I've got a question about using Unity Ads with your plugin, do I need to enable Ads from Unity Services as on the screenshot below in order to show them? Or installing Unity Monetization asset from Package Manager is enough to make ads live?

    Thanks for the answer.
     

    Attached Files:

  36. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    The best way is to install Unity Monetization.
     
  37. assets07

    assets07

    Joined:
    Feb 7, 2020
    Posts:
    1
    Hi,
    I have followed the every step available in the documentation but i am still receiving the following error.
    Could you please help me out to get through this.
    Regards
     

    Attached Files:

    murtazamaf likes this.
  38. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    I assume you are the same person you contacted us on discord. I answered there. Let me know if you are someone else.
     
  39. quangminh_iam

    quangminh_iam

    Joined:
    Jan 19, 2015
    Posts:
    6
    I use admob 5.1.0 and facebook audience network 5.10.1, get bug when build:

    AndroidJavaException: java.lang.NoSuchMethodError: no static method with name='setIsChildDirected' signature='(Z)V' in class Ljava.lang.Object;
    java.lang.NoSuchMethodError: no static method with name='setIsChildDirected' signature='(Z)V' in class Ljava.lang.Object;
    at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source:167)
    at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    at com.unity3d.player.UnityPlayer$e$2.queueIdle(Unknown Source:72)
    at android.os.MessageQueue.next(MessageQueue.java:394)
    at android.os.Looper.loop(Looper.java:148)
    at com.unity3d.player.UnityPlayer$e.run(Unknown Source:32)
    at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.AndroidReflection.GetMethodMember
     
  40. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Here is a complete project with all supported advertisers from our plugin:
    https://github.com/gleygames/MobileAds2019

    The Facebook SDK is not able to run with the latest Google libraries so if you run the autoresolve the wrong one is used:

    We noticed that if you make a resolve of android libraries the following library is added:
    com.facebook.android.audience-network-sdk-6.0.0.aar

    But the Facebook SDK 6 is not live yet, so you have to replace that library with this one:
    com.facebook.android.audience-network-sdk-5.10.0
    You can find that library inside the project we linked above.
     
  41. quangminh_iam

    quangminh_iam

    Joined:
    Jan 19, 2015
    Posts:
    6
    Thanks for reply
     
    GleyGames likes this.
  42. quangminh_iam

    quangminh_iam

    Joined:
    Jan 19, 2015
    Posts:
    6
    how can i fix this bug when build android?

    Assets/GleyPlugins/Ads/Scripts/SupportedAdvertisers/CustomAdmob.cs(79,17): error CS0246: The type or namespace name 'TagForChildDirectedTreatment' could not be found (are you missing a using directive or an assembly reference?)

    I use version lastest
     
  43. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Please update your Android SDK to the latest version (v5.3.0)
     
  44. quangminh_iam

    quangminh_iam

    Joined:
    Jan 19, 2015
    Posts:
    6
    thanks u so much
     
  45. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Could it be possible to have a playmaker action that display the On Screen Debug Mode panel please?
    Also, is there a way to probe a server to verify if the SDK can find and read a Settings file at a given URL?

    I also realized with a late test that the verification for ad availability (interstitial and rewarded) will return a positive despite doing it from inside Unity and without contacting any Ad server.
    It would be nice if the SDK would check if it's running in the editor (Unity PC or Macintosh) and in such case would actually return a negative by default, and also have a boolean option in the settings to simulate (so to speak) the situation as if the game were running on Android or iOS.

    Thanks.
     
  46. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    On screen debug more is enabled from the Settings Window. You can enable it even if you use Playmaker, no custom action is needed.
    To verify the server, just paste your link inside your browser. if you are able to see the text inside your file without any aditional clicks your server will work
    If you have Unity ads installed, those ads have editor support and they will return dummy ads in editor. So if you are getting true for ads should display inside editor too, otherwise you will get false if ads are not available.
     
  47. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    What I'm looking for is a way to activate this screen at will, through code, within the app, for debugging purposes.
    You know, just a "display debug screen" method which could be quickly integrated into a simple PM action.
    I tried a workaround but the G.O. DebugMessagesHolder doesn't appear to be an instance so I can't even create an instance on the fly from a prefab model.

    Ok seems fair enough. I was worried there would be more complex processes at work, the kind that would only be revealed by the SDK itself, hence the idea that it was the SDK that would need to be used to verify this.

    Quick wonder here. Is an encryption option (AES or else) for this online file a crazy idea or could it be feasible in the future?

    I do.

    Ah I see. Interesting. I just deactivated Unity Ads and it does indeed return a false for any advertising creative pinging, regardless of other networks being activated or not in the Settings panel.
    Good, no need for me to worry then!
    Thx.
     
  48. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    The method for activating debug mode on playmode does not exists even if you are not using Playmaker so I have to create it and i do not see the point of that. To verify that your ads work, you make a build with our test scene with debug mode enabled and you can see there what are your issues. If everything works inside there, all your setup is correct and it will work inside your game too, no further debug is needed on screen.
    An encryption for that file is not needed because no sensitive information is inside. Just advertiser names and some number representing order or weight of each advertiser. And that file cannot be changed only from your server. So someone needs to hack your server to change your settings.
     
  49. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Right then. Many thanks!
     
  50. Aitssam

    Aitssam

    Joined:
    Sep 3, 2020
    Posts:
    5
    @GleyGames Hi Sir! I have a question how we can show ads from a specific network ads? Like I have multiple network ads integrated but i want to show a admob reward ads on specific button and unity ads on other button. ?
     
    r137 likes this.