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?

  1. Facebook Ads

  2. AppLovin

  3. Tapjoy

  4. MoPub

  5. LeadBolt

  6. ironSource

  7. inMobi

  8. Mobusi

  9. Appnext

  10. Appodeal

Multiple votes are allowed.
Results are only viewable after voting.
  1. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    142
    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:
    44
    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:
    142
    You have to call HideBanner to hide a banner otherwise will be available always.
     
  4. PeppersGamer

    PeppersGamer

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

    Attached Files:

  5. GleyGames

    GleyGames

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

    PeppersGamer

    Joined:
    Jan 18, 2018
    Posts:
    10
    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:
    142
    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:
    142
    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:
    39
    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. RedLittlePolo

    RedLittlePolo

    Joined:
    Jan 9, 2018
    Posts:
    12
    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:
      6
  12. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    142
    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:
    142
    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:
    39
    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:
    142
    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:
    42
    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:
    142
    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:
    42
    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:
    42
  20. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    142
    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:
    42
  22. cabanel

    cabanel

    Joined:
    Sep 22, 2014
    Posts:
    42
    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:
    142
    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:
    42
    Thanks!
     
    GleyGames likes this.
  25. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    39
    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:
    142
    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:
    6
    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:
    39
    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:
    39
    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:
    142
    Hello,
    MoPub will be available at the end of October.
     
  31. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    142
    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:
    39
    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.