Store – Unity Plugins for Android and iOS – Plato Evolved

Here are some plugins for Unity that I have written and use myself. From time to time I will be adding more plugins so please subscribe or follow me on twitter.

All the plugins come with a ‘if it doesn’t work as you expected, you get your money back’ guarantee. If you are not completely happy with the plugin, let me know and I will refund your money.

The Unity3d plugins available include Admob and Mobclix ad banner integration, in-app purchasing and coming soon, a social plugin adding facebook integration.

There are some simple tutorial videos on my youtube channel now, so please check them out!

333 thoughts on “Store – Unity Plugins for Android and iOS – Plato Evolved

  1. Pingback: Unity AdMob and MobClix Plugins for Android - Plato EvolvedPlato Evolved

    • Is a great plugin because it shows ads…I have done exactly what is written in the “readme” file so I have NOT changed this line “<activity android:name="com.platoevolved.admobunity.AdMobUnityActivity"…". Only one question: why in my admount statistics impression are update while the click are never update?? Thank u so much!!!

      • That’s correct you should NOT change the activity name line. However you should change the package line (as per readme) to match your application. Also double check that your admob_pub_id matches exactly the one specified for your app on the Admob website. If these match then the clicks should register in Admob against your app, careful testing this since if too many clicks come from you Admob may get upset.

        • can I change in android folder “GoogleAdMobAdsSdk-6.0.0″ with last version downlodable “GoogleAdMobAdsSdk-6.0.1″ ?
          Tnx for quick reply!!

          • When you have time can you answer to previous question and this question: Do u will continue to update this plugin?

            If yes how we can downolad new version?

            Thank you so much!!

          • I will be releasing an update to the Admob plugin next week and will recompile with the latest Admob SDK. It will also include the option for different banner sizes. I will post on my main page when it is available.

    • I have added ios admob integration. When I build in unity I have noticed that tha plugin is compatible only with arm7 ios devices but on iphone this make the game much slower…It’s normal?

      • The plugin library is actually built with armv6 support but this doesn’t seem to work in a lot of cases. Apple (and Google) seem to be dropping all support for armv6 going forward (xcode in mountain lion!?), so supporting these older devices is only going to get more difficult. Arm7 making a game slower is apparently because it defaults to opengl 2, there are ways around this, google is your friend…

        • I have purchase android admob plugin and ios admob plugin. They are AMAZING plugin!!! On android works perfect but on ios I really need your help to make the game faster on arm7.please help me..also send me a private message!! Thank you a congrats for your works!!!

    • I bought the In-App -Billing purchase and I wonder if buying the Facebook Androi connect will work plumb the project.
      Please need this answer soon because I want to get your facebook plugin + Android

      Tanks

      Regards Leandro Binotto

  2. Using The AdMob plugin have I also to do stuff with eclipse or I just use the plugin in unity and then build normally my application? Thanks in advance for the answer!

    • No you don’t need to do anything in eclipse. There is a readme.txt included with the plugin that explains the (rather simple) steps you need to get it all working. Basically all you need to do is edit a couple of lines in the AndroidManifest.xml file using a text editor and you are good to go. Here is the readme.txt if you want more details.

    • Sorry, no, not at the moment. However I may support this in a future update, please subscribe to the site if you would like to be informed about updates to the plugins.

  3. I have a small question, in the Bundle identifier on the XML do i need to edit:

    “<activity android:name="com.platoevolved.admobunity.AdMobUnityActivity" to my personal identifier also?

    Or JUST edit the first line "package"?

  4. Hi, again :)

    I manage to get my ADS display correctly, and using some code of your Demo.cs i managed to turn on and off whenever i want to.
    But can you please tell how to change the default visibility?
    I want the ADS always off until i call them to be visible.

    Since i am using unity FREE, the ADS are always displayed in the “powered by unity” scene. And i can’t control that.

    I really need to turn them off by default.
    Please help me.

  5. I just bought your AdMob plugin, but I don’t see any download links? I didn’t have to have an account to purchase it, so I wasn’t logged in into anything at the time. I expected a link sent to my email, but all I got was a receipt.

    • Ah, nevermind! It took a few minutes longer than I expected =)

      I’ll get back with a response for future shoppers soon.

  6. Hola !
    Quiero comprar el In App para android plugin, pero no tengo la licencia pro de unity, solo tengo la que sirve para compilar para android.
    Con la licencia normal sirve ?
    Y por ultimo tengo que hacer algo con eclipse o me puedo manejar solo con unity ??

    Desde ya muchas gracias!
    Saludos!

    • Hola,

      Lo siento si esta traducción es un poco duro (estoy usando el traductor de google!).

      Usted sólo necesita “Unity Android para los plugins para trabajar. Usted no necesita la versión Pro.

      Usted no necesita Eclipse, aquí están las instrucciones de instalación, es muy sencillo!

  7. Hola!

    Es realmente muy rapido, muchas gracias!
    Pero me surgió un problema, cuando lo cargo en la consola del desarrollador la apk.
    Me da el siguiente problema:
    “Google Play requiere que se establezca el código de la versión en un número entero positivo de 32 bits en AndroidManifest.xml.”

    cambie en AndroidManifest: <?xml version="1.0" y lo puse asi <?xml version="1" pero en este caso, Unity no compila.

    Que puedo hacer ?

    • Hola,

      Me volvería a ir al archivo de manifiesto original en el archivo del paquete de plug-in, no hacer cambios y probablemente encontrará que trabaja muy bien, ni siquiera estoy seguro de que con la versión más reciente de la Unidad, incluso se tenga que cambiar ese archivo en absoluto, así que vale la pena probar.

      Tenga en cuenta que nunca debe cambiar

      La versión que se está hablando es el siguiente:

      android: versionCode = “1″

      Pero como he dicho antes, ir con el archivo original desde el plugin y que debe estar bien.

      Tenga en cuenta que estoy de vacaciones la próxima semana, por lo que esta puede ser la última parte de apoyo, por un tiempo, me disculpo.

      Si usted no puede conseguir el plugin para trabajar yo te daré un reembolso completo cuando vuelva (en las próximas semanas).

      ¡Buena suerte!

      And in English (just in case):

      Hi,

      I would go back to the original manifest file in the plugin package file, make NO changes and you will probably find that it works just fine, I’m not even sure that with the latest version of Unity, you even need to change that file at all, so worth trying.

      Note that you should NEVER change

      The version it is talking about is:

      android:versionCode=”1″

      But like I said above, go with the original file from the plugin and you should be fine.

      Note that I am on holiday next week, so this may be the last bit of support, for a while, I apologise.

      If you can’t get the plugin to work I will give you a full refund when I get back (in a weeks time).

      Good luck!

  8. Sorry message got a bit scrambled, here is the correction:

    Note that you should NEVER change: xml version=”1.0″.

    • Mensaje no tiene un poco revueltos, debería haber leído:

      Tenga en cuenta que nunca debe cambiar xml version = “1.0″.

      • Hola,

        Tengo dos consultas.
        1-Compre los dos plugins, in app y admob, se pueden usar los dos en un mismo proyecto ?
        2-Se pueden cambiar los tamaños de los anuncios ?

        Gracias,

        • Yes you can use both in app and admob in the same project (I do this in my own game).
          You will need to merge both AndroidManifest.xml files, I can send you an example file and help with this.

          At the moment you can’t resize the ads but I am working on supporting this in the next version which should be available in the next couple of days.

          Rough Translation:

          Sí, puedes usar tanto in app y AdMob en el mismo proyecto (lo hago en mi propio juego).
          Usted tendrá que combinar los dos archivos AndroidManifest.xml, puedo enviarle un archivo de ejemplo y ayudar con esto.

          Por el momento no se puede cambiar el tamaño de los anuncios, pero estoy trabajando en el apoyo a esto en la próxima versión que debería estar disponible en el próximo par de días.

          • Hola PlatoEnveloped!

            Al parecer in app purchase funciona perfecto.
            Me compré a mi mismo un producto y anda bien pero no puedo hacer que el producto aparesca en mi juego.

            Hice lo siguiente:
            foreach(PurchaseInfo pinfo in AndroidPurchases.Instance.PurchaseInfos)
            {
            if(pinfo.productId == “1″){
            Acá debería sumar el producto
            }

            Pero no funciona.

            Como puedo hacer?

            Gracias
            Saludos!

  9. Just got the admob plugin up and running and it works PERFECTLY! Thanks a ton, Plato! You’re a hero in the world of plugins :)

    One quick question…

    Is there anyway to refresh the ads rather than just hide/show them. I feel like I would be able to make more money/impressions if there were a refresh feature on there. Right now, I only get one ad that lasts the entirety of the game until the game is completely restarted. Thanks again for your help!

    • “Glad you got up and running quickly with the plugin. Yes, RefreshAd() is on my ‘ToDo’ list (José requested this also), I will let you know when it’s done.”

      He is working on it.

    • Hi Alex,

      Thanks for the great feedback, much appreciated. Sorry for the brevity of the reply, currently on the isle of man watching motorbikes go too fast! A refresh feature is on my list of additions, I will let you know when it is done, next week with a bit of luck.

      P.E.

      • Awesome! I’m releasing a game very soon and that fits right into my time frame. I’ll polish everything up until then. That refresh feature will complete this plugin. Once I grab that I’ll rant and rave about the awesome ease of use and reliability of your product! Thanks again!

        • Just noticed that on the Admob ‘App Settings’ page (on http://www.admob.com), you can set a refresh rate. I will still add a RefreshAd() function for added flexibility but getting it to refresh on the server side will probably suffice for a lot of people.

  10. Ha! Look at that! Don’t know how I missed that with all the playing around I did. I have a set refresh rate now. Thanks! Bumping some threads and spreading the word of your plugins :) Your work is greatly appreciated.

    • Yes, the syntax is just slightly different:

      var jc = new AndroidJavaClass(“com.unity3d.player.UnityPlayer”);
      var jo = jc.GetStatic.(“currentActivity”);
      jo.CallStatic(“ShowAds”);

      Note the additional period after GetStatic. Hopefully this is enough to point you in the right direction.

      • hi, trying to show/hide ads from java script.

        im getting unexpected token ”
        if i remove the period after getstatic, im getting cannot infer generic arguments for method………

        kindly provide a JS version of the demo script if you can….

        • Sorry for the delay in replying, had a day off! Here is some Java code, not my language of choice but knocked this up in a couple of minutes and it tested fine…

          MobclixJS

  11. I get an error “failed to compile java code to DEX”.

    I simply created a new project, imported the package, changed package name and added my admob id…

    Any idea what this could be?

    • Hi, thanks for your purchase. I would create another new project, import the package and amend nothing, check it builds without errors, then just change one thing at a time (by following the ReadMe.txt). My guess is you have probably figured it out by the time I’ve written this anyway!

      • thanks for your help, like your plugins

        and well, have you in mind to create the same pluging but for facebook ?

        i really like to buy something like that but with your plugins easy insllation and use

        nice job :D

        • Glad you like my plugins, thanks for the great feedback. I definitely want to expand the number of plugins I have. Currently I’m finishing an Admob plugin on the iOS side but since Unity supports iAd now, not sure if there is a big demand. Much prefer doing plugins for Android, so I will take a look at the facebook sdk and see what is involved…

  12. Would be nice to have a visual of the in app purchase plugin. No demo version, no movie, no explanation of how it would be used. I’m very interested in the in app purchase plugin, but how can I know if yours fits me ?
    Do you refund ?

    • Yes, you make some good points here. I’ve been wanting to do a video tutorial on each of my plugins and think that now might be a good time to start! Should have something later this week with a bit of luck. I will always refund anyone who can’t get the plugins to work or aren’t happy in any way, I will make this clearer on the website. Demo versions are a bit tricky to handle, I think with the tutorials and the refund policy they won’t be necessary.

      • When trying to call your plugin I get the following:

        JNI: Unable to find method id for ‘StartInAppBilling’ (static)
        UnityEngine.AndroidJavaObject:CallStatic(String, Object[])
        AndroidPurchases:StartInAppBilling() (at Assets/Plugins/Demo/AndroidPurchases.cs:128)
        AndroidPurchases:RestoreTransactions() (at Assets/Plugins/Demo/AndroidPurchases.cs:182)
        AndroidPurchases:Load() (at Assets/Plugins/Demo/AndroidPurchases.cs:86)
        ControllerMode:Start() (at Assets/Scripts/ControllerMode.cs:11)

        Any idea?

        • Yes, you have to deploy to an android device for the plugin to work. It won’t work within the Unity Editor (although there is some code to spoof working, for easier testing). Video tutorial coming…

          • I tried deploying to android, but it still gives me errors. I have got a logcat log that I could send you if I know where to :)

  13. A video would be really nice. I bought the plugin, but it is not completely clear to me what exactly I need to do or what to expect.

    I’ve never seen the in app billing at work, so I’m not even sure where I’m aiming for.

  14. Hola,

    El plugin anda perfecto!!
    Le quiero hacer una consulta,
    Se pueden agregar mas banners ?

    Desde ya muchas gracias!
    Saludos!

  15. Hi,

    Just bought the Mobclix Plugin. Got errors. Basically it cannot find and of the api’s. Got error message like this;

    I/Unity (19426): (Filename: /Applications/buildAgent/work/842f9557127e852/Runtime/Export/Generated/UnityEngineDebug.cpp Line: 34)
    I/Unity (19426):
    E/Unity (19426): getMethodID(“SetPosition”, “(Ljava/lang/String;Ljava/lang/String;)V”) FAILED!
    I/Unity (19426): JNI: Unable to find method id for ‘SetPosition’ (static)
    I/Unity (19426): UnityEngine.Debug:Internal_Log(Int32, String, Object)
    I/Unity (19426): UnityEngine.Debug:Log(Object)
    I/Unity (19426): UnityEngine._AndroidJNIHelper:GetMethodID(IntPtr, String, Object[], Boolean)

    Basically it could not find any of the APIs. I’m running unity 3.4.2 and 2.3.3 api 10

    • Hi,

      You need to deploy to an actual android device for the banners to work. The banners won’t work in the Unity Editor. Read the included ReadMe.txt in the plugin package, follow it religously, and you should be fine.

      • Yeah,

        Actually that’s what I did. It is being deployed on an actual device. A Samsung S Advance. And I did read the readme file and follow it step by step. Though I had to modify the Android Manifest to allow unity to compile bcoz for some reason it had a repackaged failed problem.

        • Anyways, I suspect the problem is in my modified android manifest file. I’ve tested natively in eclispe runnning a pure android (non unity) mobclixdemo and it seems to work just fine on the device. I’ll give further details of my findings here.

          • Figured it out. The problem is the manifest file or specifically my modfied manifest file. The default manifest file failed to be repackaged in my current version of unity, even after changing the package name. I did a cut and paste with the Unity default manifest and but ignored changing the package name. But now we the modified manifest fle and the right package name, works like a charm. My first unity and/or android app. Thanks. so far seems like a good plugin.

          • Excellent! Glad you got it all working. I found that the latest version of Unity seems to merge the package name in automatically so you actually only need to amend the Mobclix application id (see demo video).
            However you got it all working so that’s the main thing. Good luck with your game.

          • Ok. Got a new problem. It seems that if I push and run it through unity to the device, the ad shows up but once I run it standalone. The ad doesn’t show up anymore with the getmethodid failed (seen in adb logcat). This happens even with the demo app. Any clues?

          • Nevermind got the LAUNCHER intent declared twice. Gotta really learn this manifest thing. Sorry to bother you

          • No problem, the main thing is to keep at it, don’t give up, you only ever learn from mistakes (which means I should have learnt quite a bit by now!)

  16. How do you get Unity admob iOS to work in landscape mode? I mean how do you rotate admob 90 degrees to display properly in landscape mode.

    Great plugin btw.

    • Yes, sorry about that, there was a bug in the first version that is now fixed. Hopefully you got the link I sent you to the new version, the ads should now match the current orientation of the game view.

  17. I just saw your in app purchase (amazing how easy it works) and am willing to buy it next week, just got a few questions

    can I use it in all my games or I have to buy a license per game?
    which type of payment do you accept? (I’m thinking of paypal but not sure how you work it)

    basically thats it since I can’t find a terms of service I ask it here

    Thank you and great work

    • Hi, thanks for your interest. Purchasing the plugin through my store (it accepts paypal) enables unlimited use of the plugin within your games. However you aren’t allowed to resell the plugin or claim it as your own (pretty standard stuff). I don’t have any explicitly stated terms of service since only indie game developers would want my plugin and they are all awesome.

      • thanks a lot, i need the manual for In-App Purchasing Unity Plugin for Android. could you give me the link and help me to use the plugin.

          • Help me!I hava JDK and javahome = C:\Program Files (x86)\Java\jre6; BUT,
            Unable to run ‘jarsigner’; do you have the JDK installed?
            System.ComponentModel.Win32Exception: ApplicationName=’jarsigner.exe’, CommandLine=’-digestalg SHA1 -sigalg SHA1withDSA -keystore

          • Not sure at what point you are hitting this error? It may be that you need to add the JDK path to the PATH variable, see this link. Also it looks like it may have been a problem with an earlier version of Unity (3.1?), make sure you are at least up to Unity 3.4.

          • Unity 3.5.0f5, jdk 1.7 and PATH variable no problem But also have 3 Errors,Unable to run Unable to run ‘jarsigner’,keytool error:and Error building Player: UnityException: APK Signing Failed!

          • If you remove the plugin can you sign and deploy the app? It sounds like a generic Unity signing error that some people seem to be mentioning in the Unity forums, it may be worth logging a bug report with Unity. Some people have mentioned reinstalling the JDK as a solution…

  18. Hi!
    I bought your plugin (admob for android) and now is working, but I want to know how can I put the ads below the game, not above…
    Now the ads are showing above the game, and they covers my GUI.

    Thank You! :D

    • Hi, the easiest way to move the ad banner to the bottom is to edit the AndroidManifest.xml file (Plugins\Android folder). You want to change the following line:

      android:name=”adposition_y” android:value=”top”

      to

      android:name=”adposition_y” android:value=”bottom”

      Simple as that!

      • Hi!
        Maybe I made a mistake in my question…
        What I said is that my ad is covering my game… I have the value “bottom” but what I want is have a “linear layout”… I mean my game, and then the ads… (Now I have like 2 layers: The game in the background and the ads in front at the bottom).

        Thank You! :D And sorry for my english, Im spanish ;)

        • I see what you mean, essentially you want 2 windows, 1 for the game, another for the ad banner, so the ad banner would ‘squeeze’ the game window up instead of being on another layer.
          Sorry, I don’t support such functionality in my plugin. One solution would be to hide the ad banner while ‘in game’ and only show ads when paused or at a menu (I do this in my game).

          • Thank you, it works perfectly ;)

            I need one more thing… My ads are showing in the “Unity” splash screen, and i need to set the ads off, until I call on in my game…
            How can I make this?

            Thank you! :D

          • Good, glad that worked. I have added an option in the latest version (v1.01) to hide the ad banner at startup. I’m just squashing the final few bugs and it should hopefully be available later today.

  19. i need the manual for In-App Purchasing Unity Plugin for Android. could you give me the link and help me to use the plugin.

  20. Hi, I am considering putting in-app purchases on one of my games. Can your plug-in be used for virtual currency? (In-game ‘platinum’ that can be used to earn in game items?)
    Thanks!
    Adam

    • My plugin essentially implements the standard google in-app billing API specified here. You can use the plugin to sell a user virtual currency but it would up to you to implement the handling of this currency within your game. Hope that makes sense.

      • Thanks for the link. I read about “unmanaged” purchases, and now it is clear to me. I also noticed in your blog that you offered to help someone create a manifest for both the admob and in-app purchase plug-in. (used in the same app) Do you have any link to this?
        Thanks again!
        Adam

  21. lot of coments XD.
    just an idea….
    Could be nice if you make separate pages for the the comments of the plugins.

    I am still using your ad mob plugins and is great :D
    and i am thinking on buy later the facebookm pluging ;)

    • Glad you are still using the admob plugin, sent you the update so hopefully you will find the new features handy. Yes you are right, I should get a bit more organised, each plugin does deserve its own page with hints, links to videos, comments etc, been meaning to do it for a while now… The facebook plugin is pretty cool, yet to add it to my own game (so much to do!) but starting to get good feedback on it.

  22. hi~ i bought In-App Purchasing Unity Plugin for Android. i know AndroidPurchases.PurchaseItem(purchasableitem)
    can pruchase. how did i know wether it success?

  23. Just got the MobClix plugin; haven’t been able to get even a peep out of this thing.

    Unity 3.5.5, Android 2.3 and 4.0

    I’ve tried it in a brand new scene, followed the readme.txt to the letter. In log-cat I see the following lines indicating that _something_ is happening:

    Displayed com.grahamjans.demo/com.platoevolved.mobclixunity.Mobclix

    And

    createSurface Window{41f440d8 com.grahamjans.demo/com.platoevolved.mobclixunity.MobclixUnityActivity paused=false}: DRAW NOW PENDING.

    But in the actual app, I see absolutely no ad box.

    Thoughts on next steps for debugging this?

    • Sorry you are having problems with the Mobclix plugin. First thing to try is importing the plugin into a completely new unity project and not touching a thing, just deploy to an android phone and hopefully you should see the test ad. See the youtube video for a more thorough walkthru.

      If this works (which hopefully it should since there’s not much that can go wrong), it should give you a place to start looking for conflicts with your game (usually other plugins). If you still can’t get it to work, let me know and I will try to help further or issue a refund.

  24. Salve

    come faccio ad integrare l’androidmanifest.xml del vostro plugin adMob per unity e android con un altro plugin che ha il seguente testo??

    • Sorry, the rest of the text didn’t come through, presumably you tried to include some xml but wordpress hates xml! I will send you an email and you can attach the manifest in the reply.

  25. Just got the social unity android plugin and my screenshots are blank ( just a solid colour of what ever colour the Main Camera background is set to)..

    This is from the included demo.

    I did change the line in the AndroidManifest.xml

    From:

    to

    And build my android apps in unity for :
    Minimum API level 6 ~ Android version 2.0.1 Eclair
    ArmV6 with VFP
    OpenGL ES 1.x

    Also I bought the plugin from this website and not the unity asset store so how will updates be delivered.

    Thanks.

  26. EDIT:
    I noticed the line from the AndroidManifest xml file didnt show in my comment.

    I change the line:
    uses-sdk android:minSdkVersion=”8″ android:targetSdkVersion=”16″
    to
    uses-sdk android:minSdkVersion=”6″ android:targetSdkVersion=”16″

    • Are you seeing the GUI buttons when running in the Unity editor? Might be worth commenting out the code in Start(), if that doesn’t work, try deleting the AndroidManifest.xml, at that point you are back to a standard Unity app so should work(!)(and would point to a faulty manifest file). I recommend Unity 3.4 or above, earlier versions could cause you problems.
      Any updates to the plugins I will write a post about (so subscribe ;-) ), if you need the new version just email with proof of purchase and I will send you the newer version.

      • I did give a long and detailed reply but maybe it got spam filtered as it had numerous links to various unity forum posts in it.

        I can see the GUI buttons when running in the Unity editor, I am using unity 3.5

        I tried commenting out the code in Start() and tried deleting AndroidManifest.xml and these made no difference, I still get a blank (solid colour) image sent to facebook.

        Some say this is a fault with unity for Android, others say you need to wait for the end of the frame being drawn before creating the screenshot.

        Can you fix this?

        Thanks.

    • Hi Andrew, no the source code isn’t included, you just get a working in-app billing solution for a ridiculously low price!

  27. Hi,
    I have a question. I tried the admob plugin and after changing the xml file with the admob id and the coordinates of the banners, it works for me.

    But I have multiple levels on my game and for each level I need to change the position of the banner and I don’t know how to do this. I tried the gui in the demo scene and it worked but how can I implement it in my game?
    I tried to create a game object and put the script in it but when I play the game the gui appears. How can I change the position (and the other options) of the banner with the gui?

    Sorry for my english.

    • Hi Luigi,

      You simply would call (obviously change strings to position you want) AdMobUnityPlugin.SetPosition(“middle”,”top”) in the Start() method of a script attached to a gameobject specific to that level.

  28. Hello again :)
    I can see that you updated the admob plugin for android with the “hideonstart”. Did you add a “refresh banner” also? That would be awosome :)

    • Hi José, good to hear from you. Yes the new version of the admob plugin includes a refresh option. Note that you can set the ads to refresh every n seconds from the admob.com site (manage settings->app settings). Probably better than doing the refresh in code all the time. I have emailed you the new version.

  29. Hi,
    I saw ur facebook plugina nd liked it very much. I am considering purchasing it but i want to that is it possible to add something like “if the user like my page in facebook he will unlock something in the game” Actually this is my first game and i want a like function along with the post function in order to promote our game.
    Thanks looking for your reply

    P.S Also do u have any bundle offer where i get a discount if i purchase lots of plugin together. Something like that would be nice ;) Anyways.. thanks a lot for the videos and plugins. I was considering getting prime31 but ur seems pretty easy to me. I am new to coding stuffs so simple works best for me.. :D

    • Thanks for the comment, the Graph API (which my plugin enables with Unity) does support ‘likes’, see this link.
      However I haven’t tested this yet but will put it on my ToDo list and maybe include a demo of it in my next release, I would actually like to add this to my game so it is high on my priority list.

      A bundle is a great idea and I’ve been working towards a release, hopefully within the next few days (so if you can wait a few more days, it may be worthwhile ;-) ), the bundle will include the Admob, In-App Billing and Social Plugins. Haven’t decided on a price yet but there will be a decent saving involved and you also don’t have to worry about merging manifest files, they will all work together out of the box (the box is virtual, actually it doesn’t exist)!

        • I will post to this website when I release new versions of a plugin, usually it’s a case of emailing me with the original order details (as proof of purchase) and I send the new version by email. Can’t make any promises at this stage about new versions but if you subscribe to the website you will be one of the first to know!

  30. Hey! I love your Android plugins and got them up and running really quickly.

    I was wondering if there is a way for the Android IAP plugin to overlay the purchase dialog over the game screen instead of going to a separate black screen like it currently does?

    I was also wondering if you have any plans to create a Twitter integration plugin?

    Thanks again for your plugins. They’re really useful, and the price is great.

    • Thanks for the great feedback, much appreciated. Not sure I can do anything about the separate black screen but I will keep it in mind next time I’m digging around in the code. Twitter integration is something I plan on adding to the social plugin at some point but I’m afraid I can’t specify a timeframe yet. You will get it for free when I do eventually add it though ;-)

    • Yes it still works fine, they didn’t break backwards compatibility.The official line from Google is ‘Once most users and apps transition to iOS 6, we plan to phase out usage of UDID’. Which means realistically they will support UDID for a few more months. I will update the plugin before they phase out the UDID.

  31. hi,i have submit my app demo to Google Play, but how can i test In-app Billing , follow your video i saw you only click Buy Button and not need input credit card, I want to do what???

  32. Hello, I have bought your plugin for iOS in game purchases, but i have problem when I’m trying to compile my game I got error message:
    Undefined symbols for architecture armv7:
    “_OBJC_CLASS_$_SKProductsRequest”, referenced from:
    objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
    “_OBJC_CLASS_$_SKPaymentQueue”, referenced from:
    objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
    “_OBJC_CLASS_$_SKMutablePayment”, referenced from:
    objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
    ld: symbol(s) not found for architecture armv7

    Can you say me from tthis what I’m doing wrong?
    How should I fix it?
    Thanks..

    • Make sure you are deploying to an actual iOS device (iphone, ipad etc), the emulator won’t work. If you are doing this, try importing into a new blank project and checking if it compiles ok. You may need to set ‘Target Platform’ in Unity to ‘armv7′.
      Failing all that, let me know your Unity and Xcode version numbers (should be fine on Unity 3.5.x and Xcode 4.5.x) earlier versions of Unity had problems…

      • Hello I have solved this. There was a problem with linked libraries. There wasn’t included framework for StoreKit. But now I have a different problem. In editor, everything run just well. If I use IOSPurchases.Load() Pop up window for LogIn appears, but there is a message:”:Ignoring restoreCompletedTransactions because already restoring transactions”.
        When I log In it looks ok, but there is empty list in IOSPurchases.PurchableItems and if I try to make a purchase message like
        2012-11-09 13:59:00.302 …[2215:332] Transaction error: Cannot connect to the iTunes store. Can you give me some help what I’m doing wrong? I just run IOSPurchases.Load() when I got into scene and I just try to call IOS.PurchaseItem(name) when user click on button and IOSPurchases.HasPurchased(name) is false.

  33. hi.i’m back. now ,i have another Android plug and it also have a “AndroidManifest.xml”, how can i merge your plug’s AndroidManifest.xml ?

  34. “public void OnPurchaseResponse(string message)” this method can receive “error or cancel message” from GooglePlay? my code need get GooglePlay return message’state, how can i do it?
    when i enter into pay interface and cancel at once, wo can’t get any message from OnPurchaseResponse . please help me

    • When a user cancels from the checkout page, the ‘OnRequestPurchaseResponse’ gets called (on the UnityGameObjectReceiver) and the message string will be ‘RESULT_USER_CANCELED’. I just write to the log in the demo so you can see what is happening but you can put code to handle this situation (if you need to) in the ‘OnRequestPurchaseResponse’ method. Hope that helps!

  35. Hello,

    I purchased your admob plugin. When I import your admob plugin to my project and than build it. On my Android device it will ignore landscape mode. Whole application GUI is than stretched. It seems that there is problem with loading application. During application loading is splash screen Portrait but whole game is landscape. I am using the latest version of your plugin.
    When I delete plugin folder than it works perfectly again.

    • Hi, you need to amend the AndroidManifest.xml file (the one you amended with your Admob ID), change android:screenOrientation=”portrait” to android:screenOrientation=”landscape”.

      • It worked perfectly. Do you have any example how to combine two AndroidManifest.xml? I want to have Admob and InApp purchase. They will have ads and when they pay $1 ads will be turned off and they gain small bonus.

        Thanks for any help.

        • Yes check this link for examples of combining manifest files. As for ad removal something like:

          if(!AndroidPurchases.HasPurchased(“adremoval”)) AdMobUnityPlugin.ShowAds();

          Setting start_hidden to true in the manifest file.

          • Yes, at least one of the plugins needs to set itself up as the main launcher activity otherwise it can’t respond to clicks, I will add this caveat to the merge manifest post, so check that out for more details.

          • I understand what you mean but I don´t know how to do that :) .

            So when you will have new info please let me know…

    • There are currently no known issues with any of the plugins, they should all work. Could you let me know which plugin you have and the problems you are having?

    • Hit some orientation problems with the Admob iOS plugin so thought it was best to pull the iOS plugins for the moment. Hopefully I will get some time to fix them but can’t currently give a time frame…

  36. hey i have both your app today and i import it to my unity project the test work find when i change the manifest filed to my id no adds shows up it just shows my background what ever the camera sees.

    • If you have multiple plugins you will need to merge manifest files (there is a post on my website on how to do this). I would import just one, say the Admob plugin, get this working then import the next (which will overwrite the other’s manifest file) get that working then do the merge so that they both work.

  37. ok i have a complete new project i made with unity i import the AdMobAndroidplugin_01 and change the manifest file to my developing ID and i still see no ads.

  38. Hi.
    I did buy this, but I can not get it to work.
    The documents on this app is very poor and do not show much.

    I can not get the hash key and the video you made are not how it look for me.
    I can not see any hash key at all. It just say that its miss configure.
    Can you fix this and also show how to set it up in facebook.
    My facebook place do not look like the one in the video

    • Sorry you are having problems getting the facebook plugin working. Since the plugin supports the facebook graph API most of the documentation is done by facebook. They have excellent documentation on setting up your app on facebook here. They also have an alternative way of getting the hash key well documented here (but my way on the video is easier ;-) ).

      • No problem.
        I did solve it after some time.
        It was easy.. I just wrote something in the hashk ey field and then it did work like you show.
        Then I use that key I got from the app and put it at facebook instead for the hash key I did write.
        Now I shall read about how to use it.

        First I just want to be able to push a button to post a screenshot with a comment(link to my app) on the persons wall.

    • Not officially yet since I haven’t personally tested them. However I know that some of the plugins are being successfully used in Unity 4.0 (Android In-App Purchasing for certain). So if you want to take a chance (since the plugins are cheap!), I will issue a refund if you don’t have any luck.

  39. The admobs android plug-in works great. I had an issue at first with Bluestacks, the ads were not showing up. But it worked when I put it on an actual device.

  40. Hello,

    in app billing plugin throw this error…

    java.lang.RuntimeException: Unable to start service com.platoevolved.inappbilling.BillingService@411eb7b0 with Intent { act=com.android.vending.billing.PURCHASE_STATE_CHANGED cmp=com.Jan_Slegl.NinjaRunner/com.platoevolved.inappbilling.BillingService (has extras) }: java.lang.NullPointerException
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2376)
    at android.app.ActivityThread.access$1900(ActivityThread.java:123)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4424)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
    at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.NullPointerException
    at com.platoevolved.inappbilling.Base64.decode(Base64.java:419)
    at com.platoevolved.inappbilling.Security.generatePublicKey(Security.java:201)
    at com.platoevolved.inappbilling.Security.verifyPurchase(Security.java:126)
    at com.platoevolved.inappbilling.BillingService.purchaseStateChanged(BillingService.java:497)
    at com.platoevolved.inappbilling.BillingService.handleCommand(BillingService.java:387)
    at com.platoevolved.inappbilling.BillingService.onStart(BillingService.java:364)
    at android.app.Service.onStartCommand(Service.java:438)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2359)

    • Might be worth moving AndroidPurchases.StopInAppBilling() to OnApplicationQuit(), it may be that the service is getting shut down too soon.

  41. Thank you, I have it but not in every scene….

    BTW that LVL code for publishing? I cannot find it in publishing for Android, where is it?

  42. Hi there,
    I’ve installed the Admob plugin for Android, changed the Admob ID field to my user ID and got ads to show on real devices which is brilliant.
    I am however having a problem with the test ads and cant get them to display, to stop creating false impressions. Do you have any idea why the test ads wouldn’t be showing? I’m leaving the ID field set to the default field. I noticed in the Mobclix tutorial vid the default ID field is different, could it be something to do with that? Or is there something else I need to change in the manifest? I’m also testing on real devices. Any assistance would be greatly appreciated.
    Thanks!

    • Yes you can force the plugin into test mode using an undocumented method ‘SetTestMode’ which takes a test_device_id string. I will do a post on it tomorrow on my website (after I’ve double checked it works and reminded myself how to get the device_id!).

  43. Nice plugin! Please add support for multiple Ad formats. Or even better support for auto-width ad format so both on mobile and tablet user will see ad across the full display width.

  44. Hi,
    First of, great plugins you have! :)
    I have recently purchased this plugin and I am stumbling on a little problem with this one. I get the following error: “you must have ad activity declared in androidmanifest.xml with configchanges”.

    • Sounds like you may be using my Admob plugin with another plugin that has overwritten the manifest file. You will need to merge them. Here is a post all about how to do that. Good luck, let me know how you get on.

  45. Hey Plato!

    First off, still loving this plugin. Quick question for you though…

    I haven’t checked up on this website in a long time and I noticed you have made a few updates since last year. I was wondering if those updates are free if I already paid for the original one or if I would have to pay again for the update? (I’ll probably be snagging the in app purchase plugin soon anyway.)

    Thanks!

    ~Alex :)

    • Sorry, one more question…

      I’m definitely going to be buying your in app purchase plugin in soon. If I’m using it to handle virtual currency (let’s say 5000 beans for $1.00), how will I handle the different responses using JS? I figured out your admob plugin with JS very easily because I used to be great at C#. “Used” to be, haha. I’m assuming the purchase part would be pretty obvious, like in your video, but what about refunds? Is it possible that a user could get a refund in which case I would have to subtract virtual currency from their saved data/key?

      In the meantime, all developers should download Plato’s admob plugin. It’s more than worth the money!

      • Sorry for the delay, this one slipped by me. The Google Play API (v2) doesn’t support refunds (see here). I am going to do a post on handling ‘UnManaged’ items (like beans!) later today, hopefully there will be enough of a C# example to avoid the need for you to translate it all into JS! It’s actually potentially only adding one line of code. Thanks for the kind words, much appreciated.

  46. Hello,

    Great plugins (I use Admob and InAppBilling for Androids): simple and get things done.

    A question: is there a way to retrieve product and price list from google play using the InAppBilling PlugIn?

    • Glad you like the plugins! The current version of the InAppBilling plugin supports v2 of the Google Play IAB API. That doesn’t support retrieving product details and prices. However their new API (v3) does. Hopefully I will get a new version out of my plugin that supports these new features within the next few weeks (I’m shooting for end of Feb).

  47. Hello,

    I just purchased your Android IAP plugin for Unity.
    It works pretty well for what i’m expecting to do (buying a premium package to remove ads and unlock full game feature) but i dont manage to get the buy result for buying some usable things like gold, potions and weapon pack.

    i thought i could use UpdatePurchase() after a payment, but it does not seem to be called. So where can i plug the result of the store action after coming back to the app ?

    Thanks in advance for your help.

    Thecle

    • I’ve had this question quite a few times recently so I think it’s about time I did a post on it, as I understand your question, you are asking how to handle ‘UnManaged’ items that can be purchased multiple times. You are correct in thinking that you should use ‘UpdatePurchase’ which will get called as long as you have a ‘UnityGameObjectReceiver’ in your scene with the script attached that receives a callback from the plugin and in turn calls ‘UpdatePurchase’ (maybe I will explain this better in a post!?). Essentially you want to check for your productid (maybe ‘coins_100′) and then increment your coins variable (by 100?), I will hopefully get a post up later today, subscribe to be the first know!

  48. Does the mobclix plugin work with open allocation? I read that you needed to implement the open allocation networks separately. I’m not sure what that means.

    If not, which mobclix services do you recommend signing up for?

    BTW, the installation for this plugin was incredibly easy. Nice work!

    • No unfortunately the plugin doesn’t support open allocation, it hasn’t been a popularly requested feature (you are the first!) and probably won’t ever get added at this stage I’m afraid. Moblclix’ own list of Ad Networks should be sufficient, I can’t really give any recommendations here since I personally switched to Admob quite quickly… good luck, if you find something that works well maybe you can post back here to help other Mobclix plugin users.

      • Thanks for the response. I just started reading about mobclix payment issues and will probably be buying your admob plugin to experiment with that option as well.

        I noticed that the mobclix ad on my test phone has been the same for a day. Do I have to implement manual refreshes of the ad or is that handled by the network?

  49. Hi,

    I was integrating the InAppBillingPurchaseUtility for iOS in my Unity project and noticed that there is not method to get product information like prices, description etc. from the plugin. It seems necessary since without it, once I change the price of a product in iTunesConnect account, to reflect it in the app I have to upload the game as a new upload, although there may not be any new feature update/bug fixes inside the game. This can be annoying to a gamer. Is there any plan to add this feature along with other StoreKit functions in the plugin very soon?

    • There’s a ‘RequestProducts’ method in IOSPurchases that will return that sort of information via ‘OnProductsRequest’ (in UnityGameObjectReceiver). You will just need to parse the message string that is returned.

    • Thanks, I’ve had a few requests recently for the iOS Admob plugin so looks like I should make a concerted effort to get it working. I’ll take a look at it over the next few days and see if I can sort out the issues I was having with it (mostly orientation bugs). I will post my progress to this website…

  50. Does the facebook android plugin also work on iOS? I’m guessing it’s going to be the same source so no reason why not but thought I should ask.

    • No the ‘Social (Facebook) Unity PLugin for Android’ is just for Android only. The plugin ‘backend’ code for iOS would be completely different (written in Objective-C as opposed to Java!). I haven’t written one for iOS yet but it may happen…

    • Sorry the plugin doesn’t currently support interstitial ads, maybe in a future release but no promises. Unity wouldn’t allow it on the asset store :-( . You will notice that there are no commercial ad solutions on the asset store.

    • Yes that’s correct, as long as the facebook graph api supports it (on Android), you should be able to do it with a GenericRequest with this plugin. See friendlist for the details, along with this post, should give you want you need.

  51. Hello! I know this is somewhat off topic but I was wondering which blog platform are you using
    for this website? I’m getting fed up of WordPress because I’ve had issues with hackers
    and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.

    • No problem. I just use standard WordPress for this site but use the Akismet plugin which seems to do a good job of stopping spam. Good luck!

  52. Hi PlatoEvolved! We’re currently able to successfully buy an item in the Google Play store using this in-app purchasing plugin for Android, but after that the HasPurchased boolean still returns false for that item. Trying to buy the item again is impossible as Google Play states ‘you already own this item’.

    We’ve tried this with two non-developer accounts (the second wasn’t used for development and we only tried this once, so it is unlikely that the repurchase API limit is involved).

    The adb logcat states:

    E/Volley (15086): [14] BasicNetwork.performRequest: Unexpected response code 429 for https://android.clients.google.com/vending/api/ApiRequest
    E/Finsky (15086): [1] NotifyingErrorListener.onErrorResponse: Server error on InAppPurchaseInformationRequest: com.android.volley.ServerError
    D/Finsky (15086): [1] MarketBillingService.sendResponseCode: Sending response RESULT_SERVICE_UNAVAILABLE for request [long number] to xx.xxxx.appname.

    Do you have any idea what might cause the plugin to buy the item, but refuse any connection afterwards? Thanks!

    • The Google Play Store refuses a connection if you try to connect to it too many times in a row. This is usually caused by having one of the plugin methods in your game loop, hence it gets called 50ish fps and Google refuses any more connections. Follow the template set by the Demo scene as closely as possible and maybe try buying your productid’s with the demo scene ‘as is’, this should work fine. Here is a link to an explanation of Unmanaged/Managed products that should also help.

  53. Hi Platoevolved!
    Thanks for your reply. One day later, we were able to connect to the play store again. For testing, we implemented the demo scene. However, the item we’re trying to buy is still listed amongst ‘items for sale’, and not in ‘items you own’. But if you click the item, the Play Store responds that the item is already owned. Do you have an idea what might cause this?

    Again, on two devices, the output is:
    ONSTORETRANSACTIONRESPONSE: Result_OK
    ONBILLINGSUPPORTED: True
    But item does not get listed amongst items you own, even though it is purchased and owned according to the Play Store.
    Thanks!

    • If your code wasn’t working properly when the original purchase was made (for instance if the the UnityGameObjectReceiver wasn’t set up so no callbacks could be processed), then Google will consider the product ‘purchased’ but the application will not have processed the callback and added the product to its local list of purchased items. Simply correct the code (use the demo as a template) and do a ‘RestoreTransactions’. That will reprocess all products, and add any purchased items to the local database (via the UnityGameObjectReceiver OnPurchaseResponse callback, exactly like the original purchase should have done).

      • Hi! Thanks for your suggestions…however, there was something wrong with the private key listed in the script. No idea why this key was changed, but we pasted it again and we were able to solve the
        Signature verification failed – signature does not match data
        errors that appeared after the RESULT_SERVICE_UNAVAILABLE error was solved!

        Everything is working now! Thanks! :D

        BTW. Do you have any idea why in-app products for China are disabled (strikethrough in the dev. console)?

  54. Hi, I just bought your complete android package and am trying to get the admob feature working without much luck. I have started a new project, imported the package and then immediately did a build with the demo.

    I have all the buttons but no ad is displaying either in bluestacks or my Galaxy S2. Any ideas on what my problem might be?

    • Just a few things to check: is your game set up on admob, triple check that the publisherid is correct in the manifest file, are you using a custom rom (they tend to block ads), try getting up the test ads (see here)
      That’s about it, maybe check the manifest file is in the correct folder (Plugins\Android), let me know how you get on. Might be worth using Eclipse to see the debug log info getting thrown out of the phone, this is usually very helpful.

  55. Ok.. I have 2 questions. I’ve been using your AdMob plugin for a while and it displays just fine. It also reflects in my AdMob account but I did not change the package name in the first line. Is it still necessary that I should do this ?
    Also, I want to use your social plugin on the same game. If I import it, the manifest replaces the AdMob’s own. Since I am not to change the activity name, how do I get both AdMob and the Social Plugin running in the same game ?
    And, thanks for making these great plugins.

  56. Ok. I have two questions:
    1. I bought your AdMob Plugin and I have been using it for a while now. It works fine and reads results in my AdMob account but I did not change the first line of the manifest file to my own package name. Is it necessary that I still do this ?
    2. Also, I just bought your social plugin but I’m having issues running it and the AdMob plugin in the same game since I am not to change the activity name and they have different ones. How do I use both in one game. I’m not very familiar with these things. Am I to create a new activity for each plugin in the manifest file?
    Please, help me out.
    And, thanks for making such awesome plugins. I’m a fan of your stuffs.

    • Thanks, glad you like the plugins! I have a post on merging manifest files here. Hopefully that should help you out.
      The package name doesn’t need to be changed in the manifest file since the latest versions of Unity seem to overwrite it with the one specified in your project settings, so you should be fine.

  57. Hello again :)

    I am planing my new game and i was wondering if your AdMob plugin supports some kind of advanced positioning. Meaning: i need to make some sort of animation with the ADS, like moving it (slowly) from a hiding position to its natural top display for instance.

    Is it possible? or fading in or out BTW?

  58. While implementing RESTORE PURCHASE button for Apple guideline, I am not able (using UnityGameObjectReceiver methods) implement process: ClickTheButton – ShowConnecting – OnCancelShowFailed/OnSuccessShowOk. How to do that? Thanks

  59. Hi Plato, thanks for your in app billing for Android, unity. Muddling through but not quite getting there yet, bluestacks errors off with latest unity build 4.1.2

    When uploading to playstore getting error: “You uploaded an APK that was signed in debug mode. You need to sign your APK in release mode.”

    I was able to upload apk’s it last week ok (earlier Unity release, but also earlier play store I think as well), Now can’t find anywhere to turn off debug mode.

    Any ideas greatly appreciated.

  60. ah, oops, problem solved, needed to create a new key then select it.

    In publisher settings (for android): create new key tickbox, then browse to it, and finally select it from dropdown in key alias. This process brings up a seperate box where need to fill in Alias, password etc.

    Put this password back into publisher settings under key, publisher, password.

    now onto the next problem, item not available for purchase. … forgot to make the inapp product “active” in the playstore. so solved this too!

    ps, your instruction video is great but definitely needs updating to keep up with all the changes.

    appreciate you making this product available.

    • Glad you got it all sorted in the end. Yes I’ll probably update the video for the v3 API changes (when I’ve tested and released them, still probably a few weeks away).

  61. Hi Platoevolved,

    Do you have a sample of the inapp billing Demo.cs using java?

    or any ideas how I can implement it into a unity game that uses lots of java?

    thanks

  62. All good, the java version seems to work too.
    Note 1: java file needs to be in a different folder than plugins so the compilation works (lots of info in other places on this topic: mixing java and C# in same project)
    Note 2: This is a very cut down version from PlatoEvolved’s more elegant one.
    Note 3: still need to make the relevant changes in the AndroidPurchases file.
    Note 4: this file replaces the “Demo.cs” file in the Demo scene.
    Note 5: When running in the editor, you get errors, because it can’t connect to store, but seems to work ok on android. (Plato’s original version has catches for this)
    Note 6: may need to test for changes or something to recognise the change after the purchase, I have not fully tested this.

    #pragma strict
    public var upgradeavailablenumber : String = “0″; //used to track any purchases elsewhere in game
    function Start () {
    AndroidPurchases.Load();
    }
    function OnDestroy(){
    AndroidPurchases.StopInAppBilling();
    }
    function OnGUI(){
    GUILayout.Label(“Upgrades for sale:”);
    if(GUILayout.Button(“purchase Upgrade item x”)){
    AndroidPurchases.PurchaseItem(“upgradetestX”);
    }
    for(var pinfo : PurchaseInfo in AndroidPurchases.Instance.PurchaseInfos){
    if (pinfo.productId == “upgradetestX”){
    upgradeavailablenumber = “1″;
    //or whatever you want to do if this item purchased
    }
    }
    GUILayout.Label(“Upgrade purchased is: ” + upgradeavailablenumber );
    }
    function Update () {
    if (Input.GetKeyDown(KeyCode.Escape))
    Application.Quit();
    }

    Hope this helps someone with some ideas.

  63. Hi PlatoEvolved, help please,
    So the build and functionality seemed to work ok for an android build using the java script, but fails when I change back to do a web build in Unity.
    It fails with
    “error CS0246: The type or namespace name `AndroidJavaClass’ could not be found. Are you missing a using directive or an assembly reference?”
    on lines 123, 132, 172, 188 of AndroidPurchases.cs

    I am a bit keen not to have to strip out all the code related to the android purchases. In my java code I already have lots of ” #if UNITY_ANDROID ” sections which work well for most things.

    Any ideas greatly appreciated.
    Kingsley

    • Hi Kingsley,

      Yes I hit a similar problem in my own game. I ended up writing a new class called Purchases that had all the switching in for the different platforms ie:
      public static bool HasPurchased(){
      #if UNITY_ANDROID
      return AndroidPurchases.HasPurchased();
      #endif
      #if UNITY_IPHONE
      return IOSPurchases.HasPurchased();
      #endif
      }

      So I can then just use Purchases.HasPurchased() and keeps my main code cleaner.
      You may still need to surround the whole AndroidPurchases class with a #if UNITY_ANDROID #endif for the web build as well.

  64. Hi,

    I’m trying to use the Facebook plugin on Android. I would like to use the GenericRequest() method.

    I’m getting an error message “(#100) missing message or attachment” which seems to be related to access token.

    When I use the example graph call, it works, but this call doesn’t need the access token.

    How can I retrieve the user access token from the plugin, in order to be able to fully use the GenericRequest? If I can get it, I can pass it as an parameter to GenericRequest.

    Thanks by advance

    • In general you shouldn’t need to include the accesstoken in the graph path if you are logged in. So for instance instead of a graph path of ‘me/friends?access_token=BAAetetc’ you should just use ‘me/friends’ to get the friends list. However I may be able to expose the access token if necessary…

  65. Hi, I’m currently using your plugins for AdMob, Facebook and Android in-app billing. Have to say great work, these got my product up and running quickly!

    I’ve gotten to the point where I need to display the prices of purchasable items from the play store in the appropriate currencies. I couldn’t see any way of implementing this with the current plugin. It should be a trivial task, simply using getSkuDetails() as seen here: https://developer.android.com/google/play/billing/billing_integrate.html#QueryDetails

    Any chance of getting this added? Simply exposing a static function in UnityAndroidInterface.class would be enough for me to take it from there.

    Thanks in advance

    • Hi Mark, glad you like the plugins. Unfortunately v2 of the Google API doesn’t support getting the sku details, this is supported in the the new v3 api but I haven’t implemented this api yet. There’s some major changes in v3 and I’m looking at what’s involved but I’m afraid I can’t give a definitive timeframe yet.

        • Glad you like the plugin, thanks for the feedback. I’m just putting the finishing touches on the iOS version of the Google Play Games Services plugin, once that’s finished I will be going back and updating all the plugins to the latest api’s. I will start with the IAB Android one, so hopefully within about 3 weeks.

          • Hi!

            In v1.10 of InAppBillingAndroid plugin there are some v3 IAB changes, but I cannot see function call getSkuDetails(). I need it to get prices of purchasable items from the play store in the appropriate currencies.

            Could you implement this to the plugin?

  66. Hello,

    I am going to purchase the bundle for android, cuz they are quite easy use and hv much more instruction than others!( thumbs up!!!), but first i would like to know whether the social plugin can create a candy crush like function( ask for hearts ), please can you let me know and give a kindly advise.

    Thx
    Yan

    • Hi Plato Evolved,
      I have purchased the plugins bundle,
      however, when i implentment the facebook plugin, following the every steps from your youtube channel, it shows “failed to receive access token”, how can i solve this…….Could anyone give a hand ?

      • Hi, there is a few things you need to check: Make sure your app isn’t set to sandbox mode on facebook, make sure it is set up as native android app, double check that the key hashes are correct. Also worth using Eclipse to check the adb log. Let me know how you get on.

        • Hi, Thz so much for your reply.
          I have crash on the setup before, so i deleted the app on facebook, create a new one, uncheck sandbox, follow the steps, **New things happen**, I dont even need to enter the key hashes, i can log in with my testing accounts. Please advice.

          Thx
          Yan

    • Hi, thanks for purchasing the plugin. You have to deploy to an actual device for the Ads to show up. The included ReadMe is the best place to start.

  67. Hi
    i purchased your appbilling and android bundle

    Everything works great.

    I have simple question.

    If I want to post image to Facebook

    How to set path or change image. what i see only blue screen in my facebook. Which part of DEMO.cs should be changed

  68. Hi, i bought the AdMob plugin for unity and it works like a charm. Easy to implement as well. I need the plug in for iOS though as well.

    • Hi, glad you like the plugin. Unfortunately the iOS plugin had some orientation issues so is currently unavailable. If I manage to fix the problem I will post on this website, however it probably won’t be any time soon, sorry.

  69. Hi, i think i may have found a problem? Dunno if its with the plugin or Unity, but if i ever try and use StopAds(); with the Unity Admob plugin the app crashes.
    I can only hide ads instead of stop them from downloading and starting them when i go back to the main screen.

  70. Nice stuff. I have a problem though … I bought the android pack & AdMob isn’t working properly for me, unfortunately. In your demo scene the ads are shown but not in my game. To make sure that there is no conflict I created a new empty scene with only a camera. Ads aren’t shown. To make extra-sure that there are no conflicts I created a fresh new project. Same result: ads are only shown in your demo scene, not in a new scene. I double checked the manifest: .

    Any idea what’s going wrong?

    Many thanks in advance!

    Best,
    Felix

    • Hi Felix, thanks for the purchase. Make sure you are calling StartAds() in your scene (add a script and call it from Start()). See the demo scene scripts for an example.

  71. Hi Morgan!

    Your Google Play Game Services Plugin for Android seems really nice, could you please share the documentation just to see of what it is capable? :)
    I have a few doubts on how to implement multiplayer with unity, that’s why i am asking for the docs :)

  72. I´m getting the following error when compiling using the very latest Xcode and Unity:

    Undefined symbols for architecture armv7:
    “_OBJC_CLASS_$_SKMutablePayment”, referenced from:
    objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
    “_OBJC_CLASS_$_SKProductsRequest”, referenced from:
    objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
    “_OBJC_CLASS_$_SKPaymentQueue”, referenced from:
    objc-class-ref in iInAppPurchaseUnityLib.a(IAPUnity.o)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Here´s what I´m using: Xcode 4.6.3, Unity 4.2, iPod Touch 4G. All the SDK versions are set correctly. There´s no longer a setting for the arm architecture in Unity 4, everything is set to armv7 by default because all the tools (Unity and Xcode) dont support armv6 anymore…

    Any ideas why this might be happening?

    • Figured this one out myself. For some reason the storekit framework is not being added to the Xcode project. Adding it manually fixes it. Here´s how it´s done manually:

      – In the project navigator, select your project
      – Select your target
      – Select the ‘Build Phases’ tab
      – Open ‘Link Binaries With Libraries’ expander
      – Click the ‘+’ button
      – Select the storekit framework

      • Sorry for the delay, well done in figuring this one out. Not sure why the PostProcessBuildPlayer didn’t add the storekit framework in your case, however glad you got it working.

  73. Got your Android IAP plugin working and it’s awesome! Bought your iOS plugin and… you used the same class names for the Android and iOS classes!? So I need to keep separate projects for my Android and iOS builds? Tell me there’s a way around this and I can have both plugins in the same project.

    • Thanks for the comment, glad you like the plugins.
      No need for separate projects, you can use compiler directives to specify code that should be only compiled on a particular platform (ie Android vs iOS).

      I’m doing a lot of this at the moment as I work towards a complete mobile bundle solution plugin (iOS and Android).

      Here is some quick example code:

      public static bool HasPurchased(string productid){
      #if UNITY_ANDROID
      return AndroidPurchases.HasPurchased(productid);
      #endif

      #if UNITY_IPHONE
      return IOSPurchases.HasPurchased(productid);
      #endif
      }

  74. Hey, I had purchased the Ultimate Android Pack…
    I’ve implemented Facebook and IAP perfectly… but for some reason the Google play game services fail to work…

    I followed all your instructions provided in the read me file… still don’t understand where the problem is…

    You said,
    “Note that Google Play Game Services only seem to work when you sign your game with your release key (ie not the debug key).
    This means you will need to get the SHA1 signing certificate fingerprint for your release key and use it when you link your app in the Developer Console.
    You will then need to specify your release keystore when you export your apk from Unity.”
    I’m not sure if this is the step I’ve gone wrong with…
    The keystore I use is the one I create through unity, I’ve authorised my app and got my SHA1 signing certificate, but how do i “use it when you link your app in the Developer Console”?

    Someone please help me out, Thanks!

    • Hi, thanks for the purchase. First thing to check out is the video here. It takes you through all the necessary steps. Let me know how you get on.

      • Hey, great tutorial video… very detailed.
        I followed it step by step, buy it still doesn’t work… :/
        I think it has something to do with the manifest now… I already have a manifest file in \Plugins folder, while your plugin uses the manifest in \Plugins\Android file. I’m currently trying to merge the two.

        But, I’ve found another problem… while I was following your tutorial, I created a whole new project with just the plugin imported and made a build… and instead of giving the “Unknown error”, the app crashes when i click any of the buttons… any ideas why?

  75. Is a shared secret needed for the iOS plugin? Your Android youtube guide shows using a shared secret to connect to the Android store, but I haven’t been able to find an equivalent anywhere in the iOS plugin code. ITunes Connect had me generate a shared secret, which says it’s for IAP, so I assume I’m supposed to use it somewhere in my (the plugin’s) code.

    • Shared secrets are not necessary for ordinary purchases, they are only necessary for auto-renewable subscriptions that aren’t supported by my plugin anyway.

    • It currently uses v2 of the In-app billing api which uses Unmanaged/Managed products and no consumption mechanism. I will be implementing the v3 api in the next few weeks.

    • The ad banner plugins unfortunately are not available on the Unity Store, Unity won’t allow ad banner plugins for some reason. Of course they are available in my own store here.

  76. Hi, platoevolved!
    Google Play Game Services Plugin for Android – does not work properly?
    I see serious issues in the July-August (crash etc), on that are up to now there is no answers! If I buy, what guarantees that all functions GPGS will work correctly?

    • Sorry for the delay, wordpress just decided to let me know I had a pending comment. The Google Play Game Services plugin is working fine now (there were some initial problems). I have a ‘money back if not completely happy’ policy. Thanks for your interest.

        • Another question:
          A year ago I bought AdMob Ads Plugin for Android from you – everything works fine! Thanks! Now I think to buy a 3x plugins, all under Android:
          - Google Play Game Services
          - In-App Purchasing
          - Social (Facebook)
          Maybe you make a bundle of the three plugins with matching discount?;)

      • Bought your Google Play Game Services plugin, not yet tested but thanks anyway;)
        I plan to buy In-App Purchasing Unity Plugin for Android, tell me when it will officially support Unity 4.0,it’s very important for me, because I make the game on Unity3D_4.2.1f4!

        • The In-App Purchasing plugin works fine with Unity 4.2.x (I use it myself and have put hundreds of transactions through it). Of course if you have any problems I do full refunds (if I can’t sort the problem).

          • Thanks, understood, I’ll soon buying it.. Another question, have no issues in working together 3 of your plug-ins: Admob + Google Play Game Services + In-App Purchasing for Android, in my game need those all three plug-ins!

  77. Hi, I just bought your plugin and integrated in my game in few steps. Thank you for the tutorial video, you cleared all the SHA1 stuff greatly!
    I’ve just a stupid (I hope) question: the app shows the achievement panel correctly, but I can’t see any achievement icon. Can be like this because of the not-published app?

    • Hi, glad you liked the video. I think the achievement panel should be getting the icon from the Game services->Game details section of the GPGS website. Let me know if this isn’t the case and I will look into it.

      • Sorry for that stupid question, the answer is simple: incremental achievements don’t show any Icon until they’re complete, Just a circular progress bar.
        However your plugin seems to work fine but I need an info I couldn’t find in your scripts or demos. All the function called by your manager work greatly but I need to use some controlls like “isloggedIn” stuff. Con I access all the methods of the Android libs by your plugin?
        Thank you for your patience andare sorry for my english :P

        • As I asked yesterday I really need to know if I can use any control functions to check the correct login state. When I’ve no connections for example it give me the “unknow error” during the login phase. I need to catch that error in code and change something in my scene. Let me know how can I solve this!
          For all the rest you made a really good job! =)

          • I’ve just emailed you the latest build (v1.041) that has an ‘IsSignedIn’ method. Hope that helps.

          • I’ll answer here so everyone can know that you are GREAT! =D
            Great assistance and big patience! I’ll reccomend your plugin to everyone! =)

  78. It seems that Android In App Billing is not working on tablet devices without SD card. I don’t know why when I buy something and when tries to load the items bought by me the plugin can’t create the file androidpruchases.pur and also can’t read it because always does the same on the log:

    - StartInAppBilling
    - RestoreTransactions

    I’ve tried with real money and system is working. The problem is on saving this data that google sends.

    Thanks!

    • Hi Diego, the androidpurchases.pur file is saved using Application.persistentDataPath which is the Unity recommended place to save any persistent data. I haven’t had/heard any issues with this way of storing data so I’m pretty sure it is fine. However apparently there are build settings that can effect where this datapath resides so you may want to check those settings. See here for details.

  79. Hello, I just purchased the Google Play Services plugin for Android.

    I have it working — nicely done. Great simplicity.

    However, I don’t want to have to redirect my users to a new page to view the highscores. Is it possible to access the leaderboard data and display it myself within the game?

    Thank you.

    • Hi, sorry the plugin doesn’t currently support this but the GPGS api does so I may be able to add it to the next release, I will let you know.

  80. Hi, i have are trouble with plugin, when I try to buy some purchase – Google cancel it. And I get an email with the following content:
    “Google cancelled a recent purchase from your store.
    Reason: Other (describe below)
    Please do not process or ship this order. Below is the summary of the transaction.”
    PS
    Android.test.purchased is ok;

  81. Hi, Sorry to be a noob but I’m not understanding how to integrate Admob with Unity. I followed the steps with no outcome, and there’s a couple of issues that leave me scratching my head.

    First, the manifest. My Unity game launched with your plugin manifest settings instead of with the Unity settings, so the menu layout was portrait and oversized. After starting a level, the layout returned to the application’s correct setup, but launching the application broken for the first time isn’t a great first impression. ;) Is there something I should do to ensure the application launches correctly?

    Secondly, the ads don’t show (they do in the demo). Admob provides details for Ad Unit Name and Ad Unit Id. Ad Unit Name isn’t mentioned in your plugin. Is this optional? And my Unit ID I guess is the code needed to go in , which I’ve done. However, my ID code looks unlike the examples code (“a14xxxxxxxx”). Mine is more like “ca-app-pub-1576945218865732/4545788181″. What am I supposed to put into the ID code?

    Thanks for your help on this.

    • The new admob ad unit ID’s are a different format and now begin with ca-app-pub. You need to include the whole id ie ca-app-pub-1234567890123456/1234567890 or whatever it is. So that part of the manifest line should look like: android:value=”ca-app-pub-1234567890123456/1234567890″.

      The AndroidManifest.xml file included with plugins override the Unity one so you will have to set the orientation correctly in this file. Search for android:screenOrientation=”portrait” and change to android:screenOrientation=”landscape”.

      • Thanks. I’ve got AdMob working now and overall it looks quite impressively simple to integrate, except that I have stability issues. With internet disabled, my app fails to launch, so I need a way to test for internet presence and disable the adverts. And even when the internet is enabled, sometimes the app crashes out. There are no issues when not using the AdMob plugin.

  82. Thanks again for this plug-in, it makes things so much easier, will you be releasing an update for it with the interstitial advert support perchance? I’d happilly donate some money towards the development of it!

    • Yes, interstitial ad support is coming! I’ve just added it to my own game and it seems to be working well so hopefully I should have a new release with a week. Thanks for the offer of a donation, if you get the update and find the interstitials are working for you, feel free to donate!

  83. Hi, Im buy your plugin for google paly game services,
    I would like to know how to convert :
    – hiResImageUri;
    – iconImageUri;
    In
    – Texture2D .
    THX..

  84. Don’t work this plugin in Unity3d version 4.3.* mac osx
    I create new project and import you asset, load demo scene, past my mobclix ID and build…
    Run application, but not show banner…

    • Couple of things to try: You must deploy to an actual device (doesn’t work in editor or emulator), also make sure you have signed up to some services on the mobclix site.

        • and console message: Unable to find unity activity in manifest. You need to make sure orientation attribut is set to fullSensor manually.
          UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

  85. hey, my game crash every time i use LeaveRoom(roomid) then begin a new quick game. what must i do to start another quick game without quitting the game ?
    also how can i use the friend invites ? can you explain how it works please ?
    i have an invitation box and a show invitation box but not sure how to use them.
    thanks.

  86. I am getting ready to purchase this (Unity Admob plugin for android) from you (looks like the best plugin available not to mention your video showing how it works was extremely helpful in my decision making process) and was wondering if you have removed it from the asset store and if it will be back anytime soon? I don’t see it on the web page for the asset store or in the Unity editor itself. If not I’ll create a paypal account just so that I can get it from this particular website. Thank you for your time mate.

    • Unfortunately Ad banner plugins aren’t allowed on the Unity Asset Store (don’t ask me why?!). So the Admob plugin is only available directly from my website. Thanks for your interest.

  87. Hi, I purchased your android in app billing plugin a little over a year ago. Has there been any updates/ changes since that time?

  88. hi.. i was buy your admob plug in, thats work for my game, ads running properly, but why the ads can not clik? any help or suggestion? thanks

  89. hi.. i just want to ask.. does admob unity can integrate to Augmented Reality from vuforia?

    i try its self… but the ad cant display, any idea?

    thanks

  90. Hi, just bought your plugin for adMob Unity… imported it into my finished build, changed to my ad ID in xml … no go. No ads appearing anywhere. Not in emulator, not in test device… no error messages either…. would love some feedback or a refund…. (hopefully not).

    -B

    • Thanks for the quick shout back, solved it easily. I hadn’t added AdMobUnityPlugin.StartAds(); (duh…). Working beautifully now.

      • Hi Ben,

        Where do you have to put AdMobUnityPlugin.StartAds(); I am having what sounds like the same problem as you were, no ads deployed to test device

  91. Hi

    I have imported the ultimate bundle for android into my unity android project, amended the manifest to my pub-idXXXXX and nothing happens. Do you have any suggestions? After i imported the full package into a new project, i could see the individual unity google packages, Demo AdMob,Demo CPGS, Demo IAB, Demo Social and Demo TheWork. It definitely is not working like the demo, can you help me with some pointers. Cheers

    • You need to use your Ad Unit ID instead of your publisher id. Admob changed definitions when they moved to the ‘new’ Admob just to confuse everyone. The Ad Unit ID looks like ca-app-pub-123456789/12345678 and needs to go in the AndroidManifest file. Hope that solves your problem.

      • Ok, so you don’t need to add Publisher ID?? I also read about adding AdMobUnityPlugin.StartAds(); , where does this go?

        • Not sure what Admob use publisher id for now but just use your Ad Unit ID and you should be fine. AdMobUnityPlugin.StartAds() needs to go in any GameObject Start Method in your scene, see the Demo for an example.

          • All good figured it out. I feel more than a little silly – still getting used to Unity dev. Thanks a heap :) …now to buy iOS AdMob and take over the world buahahaha

          • Also on another note, is it normal that the android manifest comes with the wrong package name. I ended up buying the AdMob plugin as well as “The Ultimate Bundle”, cannot get the ultimate bundle working as yet, but the AdMob plugin works a treat. Any different methods to enable ultimate bundle? I may ask for a refund for the Bundle if I can’t get it working. However I now am sure it’s something I am doing wrong…….

  92. I was wondering if you admob plugin works with the new admobs sdk? and if you will update the plugin when the sdk is being updated?

  93. Hi,

    Based on good experiences with your InAppPurchasing-plugin we chose to use your Admob plugin. We’re trying to implement an interstitial-ad and have two problems (in test-mode still):

    - the interstitial ad takes a long time to show. How can we control the timing (pre-loading?) of the ad so that it shows when we want it to and not 3-5 seconds too late?

    - after the interstitial ad closes, a banner-ad shows in the top-right corner (which stays there). We use your example code:

    AdMobUnityPlugin.StartAds();
    AdMobUnityPlugin.StartInterstitial(InterstitialAdunitID);

    We thought that two ads might be called at the same time this way but if we leave out the StartAds(), the interstitial-ad does not show.

    Help is much appreciated!

    • Call AdMobUnityPlugin.HideAds() straight after StartAds should hide the banner (should rename it HideBanner now interstitials added, I know).
      In the next version of the Admob plugin I will add a callback so you know when the interstitial is loaded, hopefully will look at it this weekend.

      • Hi! Thanks for your quick reply! HidsAds() seems to work wonderfully, we now only have a single ad at a time. Did you manage to work on the interstitial.isLoaded -callback? We still have the problem that the interstitial ad often only appears after about 5 seconds.
        We also noticed that the interstitial ad refuses to show at all when the game is launched for the first time after our mobile device was turned off/on. When we close our game and then launch it again (without turning the mobile phone off), the ad will show consistently. We call the ads OnAwake() at the start of each level (=Unity scene), is that the appropiate way?

        Thanks for your help and your great work!

  94. I managed to get the ads working on the Bluestacks program but for some reason ads won’t show up on my phone, Could do with a bit of help. Cheers

  95. Thanks for your email help.

    Setting
    “private static bool forcedialogauth”
    from false to true fixes that problem for me ( log on without SSO ).

    Preliminary tests with AdMob, Inn-App and now also Facebook plugin are working (still some problems understanding why that SSO is messing things but…). I can highly recommend this Android Bundle. For that price I don’t think you can find anything better.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>