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. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Set up an ad provider that has banner ads and call this:
    Advertisements.Instance.ShowBanner(BannerPosition.BOTTOM);

    And your banner will show. Dont forget to call:
    Advertisements.Instance.Initialize();
    at the very beginning of your app
     
  2. TillmaniaLtd

    TillmaniaLtd

    Joined:
    Jan 29, 2013
    Posts:
    65
    Yeah I know how to show a banner, but does it ever disappear without me explicitly hiding it? If so, is there a way to check if a banner is currently showing?
     
  3. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    You have to call HideBanner to hide a banner otherwise will be available always.
     
  4. PeppersGamer

    PeppersGamer

    Joined:
    Jan 18, 2018
    Posts:
    17
    I keep getting this error on building to IOS. Any help would be great.
     

    Attached Files:

  5. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Let us know what advertisers are you using so we can reproduce the error ourselves
     
  6. PeppersGamer

    PeppersGamer

    Joined:
    Jan 18, 2018
    Posts:
    17
    I am just using Unity ads for IOS. It went away when i disabled Unity Ads in services.
     
  7. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    We are glad you managed to solve your problem, we will add this in our documentation in our next update.
     
    PeppersGamer likes this.
  8. arifancatur

    arifancatur

    Joined:
    Aug 11, 2019
    Posts:
    3
    when startapp will include ?
     
  9. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    We do not have plans to include startapp in the near future, if more users will ask for it we will consider it. Thank you for your understanding.
     
  10. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Hi,
    Just did a clean install to check a few things and found that the latest version of the plugin in Unity 2019.2.2f1 threw me twice this error:

    It's a Playmaker related script in PlayMakerSupport/Actions/. Is there a typo or is the prefab having issues being recognized?
    I went into the Gley setup menu and activated Playmaker support. These two errors could be deleted but I can't say if activating PM support was necessary to do so. I don't think it's a big issue but it's stressful to receive an error when installing a plugin.
     
  11. YongAiFaDian

    YongAiFaDian

    Joined:
    Jan 9, 2018
    Posts:
    13
    When I build admob for iOS, when I run the game in xcode, it show this error, how to resolve it?
     

    Attached Files:

    • 1.png
      1.png
      File size:
      29 KB
      Views:
      384
  12. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Activating PM support is not necessary for the plugin to work, just clear your console and the errors will go away, you can ignore them. The issue is unity related because the script that is on the prefab is not active only when Playmaker is active, so unity thinks that is a bad script. We will try to find a solution for this in our next update, but the plugin will work the same so no worries.
     
  13. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Make sure you have cocoapods installed, please check the documentation.
    If still doesn`t work let us know what advertisers are you using and what Unity version.
    Thank you.
     
  14. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Yes, the error is fortunately not lethal. :)
    I just threw this as a report in any case, if I was the only one having it, I thought it might be good to let the dev be aware that *something* happened.
    It comes from inside the prefab which contains some stuff looking for Playmaker, even if PM is not installed. Now that Unity has these nested prefabs, I wonder if this PM related stuff could be switched off/muted by placed in a sleeping prefab, only activated when it's actually needed.
     
  15. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Thank you for reporting it. We would look into methods of removing this error in our next update. We don`t like also to have errors in our packs.
     
  16. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    Hi, I bought your plug in is done well, since 1 August Google has imposed 64-bit publication

    I have Unity 2017.4.25
    Mobile Ads GDPR Compliant 1.4.7
    GoogleMobileAds 3.16

    I forced the Play Service Resolve: Force Resolve
    to create 64-bit "* .so" files (for other libraries)

    and everything works fine (the banners are visible) on the test device transferring apk from usb

    if I publish banners on Android they are not visible and the log gives me no error!

    can you help me?
     
  17. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    First of all, update your SDK. Current version of Mobile Ads is 1.7.1 and current version of GoogleMobileAds is 3.18.3.
    Please update to the latest version and let us know if the problem persists.
     
  18. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    now with:
    unity 2018.8.4
    Mobile Ads is 1.7.1
    GoogleMobileAds is 3.18.3

    I published it in open beta
    but the banner is not displayed

    on the test device transferring apk from usb work fine
     
  19. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
  20. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    We ware able to see banner ads in the app you have posted.
    Screenshot_20190905-205011.png

    Can you send us also the link to the public beta app?
    You can ad us as a tester with gley.mobi@gmail.com
    Nobody reported this issue before so we need to check it. We just published a game last week and our ads are working in the live version.
     
  21. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
  22. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    now it works also in the beta version (without modifying anything!

    maybe it's an admob problem

    the app had already been public for at least 6 months and the advertising worked well.
    Had it ever happened to me that doing an update the advertisement was not displayed, (2 days of waiting) as if it had to be approved?

    now also works with old libraries

    however you advise me to upgrade to:
    unity 2018.8.4
    Mobile Ads is 1.7.1
    GoogleMobileAds is 3.18.3
    ?
    thanks
     
  23. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    We can confirm that your ads work in beta version on our device too, please check the link:
    https://www.dropbox.com/s/5alx3va561n3o11/2019_09_06_17_37_44.mp4?dl=0

    As you said maybe it was an Admob or Google Play problem since they are updating their aps to 64 bits support.
    We are glad you managed to solve your problem.
     
  24. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    Thanks!
     
    GleyGames likes this.
  25. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Hi,
    Regarding Playmaker;
    I can't said if it's a problem on my side but most likely because of the way the scripts are written, in particular with the region filtering, the actions do not appear in the Action Browser in Script Control.
    I also think it's better to have them show up in a folder that's unique to your plugin.
    I don't have access to an old version of your plugin so there's something I'd like to know: is it me or were your actions formerly located in the custom actions folder, under Gley Mobile Ads?
    Because an old project of mine has several of them in this folder and are showing up properly in the Action Browser in the category of that name, but I also remember that I was trying to code some more, relative to GDPR requesting, and they also ended in that folder and unfortunately I can't remember which ones were mine. That is because I didn't add any kind of comment that would tell me they're mine, a mistake surely.

    Usually third party editors of plugins add the VS stuff (bolt, pm, etc.) in an extra package to install. Maybe you might want to do the same and add an "install actions" in the setup window of GMA? This way the scripts won't be unpacked by default and you will not have to do the regional filtering, which seems to mess up with Playmaker's ability to detect the actions.

    Last one btw. I had actions that pinged servers to see if banner, interstitial and rewarded ads were available, each sending appropriate Playmaker events in return. I see that GameFlow has actions that have names clearly evoking such functions. Perhaps they'd be a nice addition to Playmaker's actions too?
     
  26. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Our Playmaker actions are all located inside this folder:
    actions.JPG
    Those actions are not compiled inside your code only when Playmaker support is enabled like this:
    enable.JPG
    If the Playmaker support is not enabled the above files will be just empty files not compiled inside your code.

    About more Playmaker action make a list of what Playmaker actions do you need and we will try to add them in our future release.
     
  27. pky

    pky

    Joined:
    Mar 11, 2014
    Posts:
    7
    Hi GleyGames,

    I would like to know when MoPub will be integrated into your Mobile Ads?

    Thanks.
     
  28. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Sorry, looks like I had an odd bug on my side. I would type "banner" in the action browser but yours would not show up. Yet the box was already ticked in the setup. I unticked it, closed Unity, reopened it and reticked the box, now they show up. Strange.

    Well, if you can find time, I would say, first of all, two actions to check the availability of interestitial and rewarded ads. So the app can decide to show some UI elements or not and do other things, depending on the availability of these ads, without trying to show them.

    Then two more actions to fetch either an interestial or rewarded ad, for example to load one on the phone at a time during the game when it's not going to cause any visible hiccup on the framerate.

    So to sum up, here are the four actions that I could find useful:

    - check interstial ad availability ; two exit events, "available" and "not available"
    - check rewarded ad availability ; two exit events, "available" and "not available"
    - manually fetch interstiatial ad ; two exit events, "success" and "failure"
    - manually fetch rewarded ad ; two exit events, "succes" and "failure"
     
  29. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    As an example, here's an action I have in the old custom folder. It's for checking on the availability of an interstitial ad. I can't remember if it's one of yours of what I attempted to produce some time ago.
    I'm not an experienced coder. Would something like that work?

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. namespace HutongGames.PlayMaker.Actions
    4. {
    5.  
    6.     [ActionCategory("Gley Mobile Ads")]
    7.     [Tooltip("Verify if an interstitial ad is available for display.")]
    8.  
    9.     public class InsterstitialAdAvailability : FsmStateAction
    10.     {
    11.  
    12.         [Tooltip("Event sent if an interstitial ad is available.")]
    13.         public FsmEvent available;
    14.         [Tooltip("Event sent if there is no interstitial ad available, in which case it might be necessary to manually fetch one.")]
    15.         public FsmEvent notAvailable;
    16.  
    17.         [UIHint(UIHint.Variable)]
    18.         [Tooltip("Store the result in a Bool variable.")]
    19.         public FsmBool storeResult;
    20.  
    21.         // Code that runs on entering the state.
    22.         public override void OnEnter()
    23.         {
    24.             //Fsm.Event(Advertisements.Instance.IsInterstitialAvailable() ? available : notAvailable);
    25.  
    26.             if(Advertisements.Instance.IsInterstitialAvailable())
    27.             {
    28.                 storeResult.Value = true;
    29.                 Fsm.Event(available);
    30.             }
    31.             else
    32.             {
    33.                 storeResult.Value = false;
    34.                 Fsm.Event(notAvailable);
    35.             }
    36.         }
    37.     }
    38. }
    39.  
     
  30. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    MoPub will be available at the end of October.
     
    pky likes this.
  31. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    The action for interstitial is available and rewarded video is available will be added until the end of this month. The other two actions are not supported by our plugin. Our plugin loads the ads when you call Initialize and after an ad is shown the next one is loaded, so the functionality you are asking is not available in our plugin and it will not be in the near future because is beyond the scope of this plugin.
     
  32. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Thanks. Can't wait for the update then! :)
    The first two actions are more important anyway, since ad availability can greatly influence the display of certain elements and assets in a game.
     
    GleyGames likes this.
  33. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    As we promised, we added those 2 Playmaker actions in our latest update that is available now to download in Asset Store.
     
  34. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    470
    Woah good news. I am not sure if I should have specified what kind of interstitial we're looking for.
    Rewarded ads are, as far as I know, videos. But interstitials can either be static images or forced videos.
    What type of advertising media is the interstitial check action going to look for exactly?
     
  35. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Interstitial can be both static or video, you cannot request for a video interstitial or a static interstitial, those setting are made inside your dashboard and depends on what advertiser you are using.
     
  36. UDN_588d63f4-5684-4397-80b1-1ab6f45d33d3

    UDN_588d63f4-5684-4397-80b1-1ab6f45d33d3

    Joined:
    May 12, 2017
    Posts:
    2
    Hello,
    We have integrated admob in Unity 2019.2.5 and on start up app crashes every time.
    We have set up app is from Window->GoogleMobileAds->Settings.
    How we can solve this problem?

    Thanks,
     
  37. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Are you using Smart banners from Admob?
    Currently there is a Unity Bug with Smart banners in Unity 2019.2. Please read the following forum:
    https://github.com/googleads/googleads-mobile-unity/issues/987
    If you need Admob banners in your game, use normal banners not smart, and if you need smart banners use Unity 2019.1.x.
    We hope that this is your issue. If not, it is possible to send us your crash report or an .apk?
     
  38. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    hi,

    2 questions:

    Mobile Ads GDPR Compliant1.7.3 is compatible with GoogleMobileAds-v3.18.3 or only GoogleMobileAds-v3.18.2?

    i work with unity 2017.4.32 work fine with Mobile Ads GDPR Compliant1.7.3?

    tks
     
  39. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Our package will always be compatible with the latest SDKs available for each advertiser.
    Our package works with 2017.4.32. If for any reasons you have problems with our plugin you can ask for a refund we will refund you without any problems.
     
  40. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
  41. riccilicardo

    riccilicardo

    Joined:
    Sep 28, 2019
    Posts:
    1
    Hi Gley,

    I just bought this asset and implemented it in android platform and the ads shows perfectly. But I had this issue about applovin reward video ads. When the video ads is shown and when I press the main menu button and then return to the game, the ads will be closed and even the video is not finished it gives a completed = true result.

    Can you help me how to solve this?
     
  42. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    Hi,

    on different devices the height of the admob banner may be different.
    is there a way to read the real height of the admob banner?

    thanks
     
  43. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello, Can you provide us an .apk or a video to see exactly what is your issue and how o replicate it to be able to find a solution. Thank you!
     
  44. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    You cannot read the banner size since the banner id drawn on top of your app, not inside your app but you can use this table to compute it if you want:
    Banner_Size.JPG

    Our assets supports BANNER and SMART_BANNER only.
    Definition of dp: Density-independent pixel
    A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels.
     
  45. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
  46. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    68
    hi,

    unity 2018.4.10
    Mobile Ads GDPR Compliant 1.7.3

    in my project I just want to use AdMob and remove Unity Ads. But when I remove the UnityAds service it gives me a mistake:

    Unloading broken assembly Library/ScriptAssemblies/Assembly-CSharp.dll, this assembly can cause crashes in the runtime

    after unit crashes

    reopen Unity give me this error:
    InvalidOperationException: Sequence contains no matching element
    System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <fbb5ed17eb6e46c680000f8910ebb50c>:0)
    Advertisements.Initialize () (at Assets/GleyPlugins/Ads/Scripts/Advertisements.cs:195)
    MenuMain.Start () (at Assets/Scripts/MenuMain.cs:1392)

    this is settings:



    thanks
     
  47. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
    Hello,
    Please delete your library and delete all Unity Ads related scripts if you do not use it anymore.
     
  48. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482
  49. comrad3

    comrad3

    Joined:
    Jan 2, 2017
    Posts:
    3
    @GleyGames hi i purchased this plugin but i didn't find admob Mediation ? is this only simple ads mediation ?
     
  50. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    482