Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Reign Unity Plugins (Win8/WP8, BB10, iOS, Android, ect...)

Discussion in 'Assets and Asset Store' started by zezba9000, Oct 1, 2013.

  1. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Working fine now! Thanks! :)

    I have one question about the interstitials, do I need to use "InterstitialAdManager.CreateAd" and "ad.Show" every time I want to show an ad? Or just CreateAd one time and ad.show() every time?
    What I'm trying to do is show an Interstitial once every 2 plays, so I use CreateAd at the beginning of the scene and then at the end of the scene, if he did not see an ad last time, I use ad.show(). Now what happens is when I createAd and do now show it, the next time I try to show it crashes the app.

    Using createAd and ad.show only when I want to show the ad seems to fix this, but also seems like it takes a little longer to get the add.
     
  2. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    You only need to create the Ad ONCE via "InterstitialAdManager.CreateAd" and then can call ad.Show multiple times.

    What platform is this happening on? Android, iOS or WP8?
     
  3. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    @totsboy Ok looks like there was an async bug that doesn't happen on my device but probably yours, can you download and replace this "reignnative.jar" file and test? I think it should solve your issue as its working on my Android device. If so I will make update packages for others, thanks.

    Download: https://www.dropbox.com/s/pjojzf7g2snz9av/reignnative.jar

    EDIT: Pushed the update out to the live updater.
     
    Last edited: Apr 11, 2014
  4. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Working fine now! thanks again for the quick support! :)

    Apparently there's no way to "cache" a interstitial, right? I know chartboost does it, but I never worked with adMob before so I don't know if it's possible.
     
  5. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Awesome! Well yes there is a way to "cache" it. I can update the API to support that in a future release.
     
  6. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Awesome! :D

    Is it normal for interstitial ads to appear cropped out like this on WP8?
     

    Attached Files:

    Last edited: Apr 12, 2014
  7. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
  8. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Pushed out an update to that plugin that may solve some WP8 Ad bugs some people were having.
    Looks like the plugin may not have been compiled against the newest version of the MS Ads API.

    Also separated out some APIs in Android and iOS so you can remove components you don't use.
    For Android, I can fully remove the dependency on overriding the main unity activity, BUT that will force the system to create a new TEMP activity that handles events. ONLY con with this is GooglePlays IAP buy popup will be viewed against a black background vs overlaying your game screen. And selecting images will be a little slower.

    But it seems people may not care about this if I was to add in Facebook support?

    EDIT: Make sure you update to the newest WP8 Ads SDK: http://www.microsoft.com/en-us/download/details.aspx?id=8729
     
    Last edited: Apr 13, 2014
  9. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Unable to update here, this is the message I get:

    (I did Revert before trying to upgrade)
     
    Last edited: Apr 14, 2014
  10. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    I will try to reproduce and fix. Looks like a stream my not being closed right.
    In the meantime, you can download the Bleeding edge packages instead.
     
  11. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Tried bleeding edge but it gave me an error while trying to import and only imported some of the scripts, now it won't build with these errors:


    Edit: the error importing is:
     
    Last edited: Apr 15, 2014
  12. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    If Unity can't even move your file then something is wrong and your file may be locked or hidden.
    Can you manually delete the file and re-install the package.

    Not sure how this would have happened.
     
  13. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    That solves the issue when building for android, but when building for WP8 I'm getting an error similar to the one you get when you don't use "Set Platform > WP8"

     
  14. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Yes there was a WP8 Advertising SDK update you need to install that should fix this issue.
    Download and update to v6.2.40325.0 http://www.microsoft.com/en-us/download/details.aspx?id=8729
     
  15. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
  16. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Yes because of the way Unity3D is doing linking I have little choice but to do it this way.
    I've tried to make it so you could remove MSAds support, but it ends up causing more issues because Unity is using Mono.Cecil to resolve dependencies for some silly reason which causes so many issues.

    Unity first compiles the scripts with Mono before it compiles with the MS-Compiler which makes little to no sense and forces hackery on my part as the .NET version are not compatible.

    But it doesn't matter as it doesn't increase your app size as its just an external link, so it doesn't matter.
     
  17. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Facebook isn't the only library that uses the Main Activity. There are a lot of others, including some that do video ads, push notification, user tracking, etc.

    Another IAP plugin, called OpenIAB, says that on Android it it uses a proxy activity, so that it won't use the Unity Main Activity, to make integration with other libraries easier. Would using a proxy activity be a possibility for the Reign plugins as well?

    Here is the OpenIAB page that talks about the proxy activity:
    https://github.com/onepf/OpenIAB/tree/master/unity_plugin

    Thanks!
    Jacob
     
  18. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    I think it may be, for some reason I had thought it would not when looking at the docs. But looks like I may have been wrong. I will apply this to the plugin if it works very soon if thats the case.

    Thanks.
     
  19. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Ok, building fine now after upgrading microsoft ads sdk, but the interstitial ads are still cropped on WP8 (testing on lumia 520). Does it appear normal on your devices?
     
  20. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Yes this appears to be a bug in the native SDK. Waiting for an update from google and then this should be fixed after version 6.5.11.

    Google Forums Link
     
  21. EnigmaCEO

    EnigmaCEO

    Joined:
    Jul 7, 2011
    Posts:
    14
    There is a major security flaw with the Google Play IAP plugin. Currently, about 40% of our successful transactions are fake purchases.

    Players are exploiting a Google spoof and buying up an unlimited amount of currency. This is causing a major headache for us because we are trusting the plugin's success results.

    No other platform is experiencing this issue and we are also using the Amazon, BB10, and iOS versions.
     
  22. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Looks like there is an app that can fake the IAP system on the local device.
    I think it is just saving purchases in the local cache probably.
    http://andro24world.blogspot.com/2014/01/freedom-v102-google-play-in-app.html
    http://kickass.to/freedom-1-0-6-free-in-app-purchases-android-root-t8993360.html

    I wonder if there is a work-around to stop this. Did you see anything that may be of use after looking into it?
     
  23. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    After looking at the code further, it looks like there may be a bug in the code that is not verifying the purchase with your base key.
    I will get back to you on this and get a fix out if this turns out to be the case.
     
  24. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    I know there is an IA system, which provides a php file so that you can set up your own 3rd party verification of purchases. It's called Simple IA System. It doesn't currently support Reign plug in directly, but I was thinking to ask them if they could add support for them.

    http://forum.unity3d.com/threads/194975-Simple-IAP-System-(SIS)
     
  25. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    I could also add 3rd party verification that could be used via PHP or ASP.NET. But the service file would have to be located on your own server for verification. But after I push the fix for testing the purchase with your base key, the issue for the most part should go away I think. Unless that IAP hack app is doing more special magic or something.
     
    Last edited: Apr 23, 2014
  26. EnigmaCEO

    EnigmaCEO

    Joined:
    Jul 7, 2011
    Posts:
    14
    Actually there are quite a few fake purchases coming from iOS as well.
     
  27. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Will look into this and make sure security measures are being taken in the API, thanks for the info. If there are no security bugs in the API, I will add in remote server side checking tools.

    I should have more information about this tomorrow.
     
  28. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Getting an error after a successfull purchase callback.
    The problem is that it does not remove the ad banner as it is supposed to, the banner just sits there forever, doesn't even refresh anymore.
    When I open the game again again the banner no longer shows, meaning the purchase did actually work.

    Here's the error:

    $error banner.jpg


    edit: seems like i was destroying the banner and creating again every time instead of making it visible/invisible. It's working now, but the error still shows on log!
     
    Last edited: Apr 26, 2014
  29. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Thanks i'll take a look. Should be out with an update this weekend for several different items.
     
  30. SillyCat Studio

    SillyCat Studio

    Joined:
    Sep 19, 2013
    Posts:
    5
    Hi zezba9000,

    I've purchased the Mobile Plugin yesterday, and I'm trying to put an ad banner on my Windows Phone 8 game. I've follow the documentation.
    When I am on Unity and launch the scene I see the GUI banner but when I build and run on my Windows Phone (Master, ARM) with VS Express 2012 Windows Phone, the banner doesn't show up on my game. I don't have any error on the console.

    Here is my code related to the banner, I'm using Admob:

    HELP! please ^^

    EDIT: I've test it using the Emulator, still no banner. :(
     
    Last edited: Apr 27, 2014
  31. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Hi zezba9000,

    Any chance you could add a WebView capability to the API at some point in the future?

    Thanks!
    Jacob
     
  32. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Hi SillyCat,

    This is because you need to set "WP8_AdAPI = AdAPIs.AdMob".
    It defaults to None. Take a look at "AdsDemo.cs"
     
  33. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Yes I can do that on supported platforms. Will never be able to work on BB10 though because Unity can't use Cascades, but would on Win8/WP8, iOS Android.
     
  34. SillyCat Studio

    SillyCat Studio

    Joined:
    Sep 19, 2013
    Posts:
    5
    Thanks, I haven't seen that line.

    So, here is my code now:

    It still doesn't show the test banner on Emulator or on Device.
    I lose some fps when the ad is called but no banner appears. :'
     
    Last edited: Apr 27, 2014
  35. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Your AdMob UnitID is wrong and should have "ca-app-pub-" in front of it.
    Also its not a good idea to post your IDs so others can misuse them.
     
  36. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    @EnigmaCEO Ok an update was just pushed out that ads extra "Receipt Validation" security to both Android GooglePlay Store and iOS Apple Store.

    Other fixes:
    1) "OK MessageBox" no longer throws an exception in some cases on Android.

    2) Win8-WP8 Scoreoid Leaderboard and Achievement support. (Works on all other platforms too, but native score APIs for those platforms are coming too).

    3) Interstitial Ads now support Ad Caching. NOTE: You must now call "Cache" and then call "Show" after the even fires. Look at the demo for more info.

    4) Ads now have a "Refresh" method for manually telling the Ad to refresh. NOTE: BB10 Ads and iOS iAd do not support this.

    5) Receipt Validation for GooglePlay and iOS stores.

    Let me know if there are any issues with the update.
    Get updates via "Edit->Reign->Check for updates" or download Bleeding edge packages.
     
  37. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    Awesome! Mobile Unified just gets better and better. :) Any idea when you'd be able to add it?

    Thanks!
    Jacob
     
  38. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    The plan is to have native leaderboards for each platform next. Then add tackle that feature and others.
     
  39. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
     
  40. 2Bambu

    2Bambu

    Joined:
    Apr 19, 2014
    Posts:
    3
    Hi zebza9000,
    first of all, congrats for this very awesome plugin.
    I'm trying to create a very simple casual game for Windows Metro.
    On Start() of the Game scene I istantiated the Ad correctly and everything is working good with Microsoft pubCenter Ads.
    The issue come up when a player dies and restart the scene (I simply do an Application.Load("Game") ) when the ad shows no more and i get the message:
    "you must wait for the last ad finish being created" in the development console.
    Can you help me?

    THank you very much.
     
  41. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Ok you should be able to pull, there were duplicate files listed on the server update script.
     
    Last edited: Apr 28, 2014
  42. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    I'm guessing you are trying to destroy Ads to hide them? You should be using "ad.Visible = true/false" to show and hide Ads. If you wish to create more then one ad its recommended you pass in a array of "AdDesc" objects into the create ad method.
     
  43. 2Bambu

    2Bambu

    Joined:
    Apr 19, 2014
    Posts:
    3
    Thank you very much for support!
    I stopped to dispose Ad and used Visible property and everything is going good. :)
     
  44. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Also to get rid of any confusion with interstitial ads. You MUST call "ad.Cache" before "ad.Show" now. Take a look at the interstitial ads demo cs file.
     
  45. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    All working now!
    And thanks for the cache feature, works really well :)
     
  46. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Last edited: Apr 30, 2014
  47. 2Bambu

    2Bambu

    Joined:
    Apr 19, 2014
    Posts:
    3
    I have a question,
    do you plan to integrate adduplex in the next releases?

    Thank you for info :)
     
    Last edited: May 1, 2014
  48. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Yes Adduplex is planned to be added into the plugin.
     
  49. totsboy

    totsboy

    Joined:
    Jul 12, 2013
    Posts:
    253
    Is there a way to check if the ad is cached? Apparently I'm getting a crash when I try to show the add and it is still not in cache, even after calling ad.Cache();
     
  50. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    998
    Yes there is a even callback that gets fired after the Ad is cached. Look the updated "InterstitialAdDemo.cs" code file.
    Code (csharp):
    1.     private void eventCallback(InterstitialAdEvents adEvent, string eventMessage)
    2.     {
    3.         Debug.Log(adEvent);
    4.         if (adEvent == InterstitialAdEvents.Error) Debug.LogError(eventMessage);
    5.         if (adEvent == InterstitialAdEvents.Cached) ad.Show();
    6.     }