I’d like to announce the release of Unibill; a cross platform approach to In App purchasing. It’s a single plugin that works across the Apple App store, Mac App Store, Google Play and the Amazon App store!
It’s the plugin I wish I could have bought for my own game development; a simple, clean and consistent interface that does all the heavy lifting, leaving you to get on with the bit that’s actually a game.
But Unibill does much more than just let you buy stuff; it helps you through the entire integration process, with tools to help you bulk upload your purchase metadata to Apple and Google, and automatic integration with Amazon’s SDK tester.
It also keeps a basic local database of what your users buy. It’s a plugin by someone who’s been through the gauntlet of pain, and put padding on all the sharp corners for you.
Unibill is distributed in source form, with all unit tests.
It’s available now on the Unibill website and the Asset Store - $125 for a plugin that replaces 4!
Had a quick look through the blurb. Is there a way to be able to add to the product list at runtime? E.g. I may want to add items to my store via data once the app is released.
That’s not built in, but it would be easy enough to do so. You would need to fetch the updated UnibillInventory.xml file and store it locally, before initialising Unibill. You would then modify Unibill to look for this local file and use it in preference to the bundled version.
Unibill is a source distribution, so you are free to change it as you like. I’m also happy to give you further pointers on any modifications you may require.
I’m not keen on making changes to third-party plugins as I may run into problems when getting an update, plus I’m buying a plugin to save me work, not create it.
As this is a feature that may be important to other users wouldn’t it be better to have a nice clean way to do it? Something like a public method SetProductIds(string[ ] productIds)? Similar to how it’s done with the Prime31 plugin.
I already have all my product ids in json data files (along with other relevant data) which is used to set up data structures on startup. I can easily upload a new version on this file as required - well to be accurate, a bundle of all my files so that the download to the device is done as an atomic operation. I don’t really want to maintain an xml file with duplicated data and deal with the other stuff you mentioned.
Product IDs may vary across the three different billing platforms. Unibill abstracts this by mapping platform specific product IDs to Unibill product IDs which do not vary across platforms.
If you were to manage your own product IDs you would have to do so for each different platform, requesting the right set of product identifiers at startup and then, on receipt of a billing event, mapping them back to the same actual product.
Hi
Just got your Unibill and it looks great
I have just a couple of questions/problems when i integrated it into my project.
I have a couple of prime 31 plugins that I’m using and when i try and do a build I have to reload the prime 31 plugins and do a full replace of the project to get it to work. If I just do a append it has removed the prime 31 plugins or the project just dosnt load at tall.
If a do a transaction restore but i don’t have anything to restore the onTransactionsRestored dosnt get called.
Plus in the inventory editor when you close it and reopen the Purchasable item Id always reverts to lower case, i have some items with capitals in and i have to reenter them every time i want to make a change.
But apart from that every thing seems to be working nicely
Which target platform is this - iOS or Android? When you say it has ‘removed’ the prime 31 plugins what exactly does this mean; are files being removed from your Assets folder? Which prime 31 plugins are these?
Is this on an Android or iOS device or within the editor itself?
Unibill converts all Unibill inventory ids to lowercase; why do you need mixed case identifiers? If you have mixed case identifiers registered with Apple or Google you can specify mixed case overridden identifiers for each platform in the inventory editor.
Thanks for buying! Happy to help you with this, we can skype if necessary.
Sorry for not stating the platform it was IOS. The prime 31 plugins stay in unity but when i build the xcode project it dosnt transfare the files across. It looks like it could be a conflict with the post build process when it building the xcode project.
This again was on IOS but i will need it for Android as well, I did a quick mode to the code so even if it gets zero transactions it will still fire of the onTransactionsRestored call and then i check it on my side to see if there is anything to do.
I needed this as i put up a message for the user telling them that i was checking as this could take some time over 3g, but if there wasn’t anything to restore i didnt get a message back to tell me to take down the message.
I do have mixed case ids with apple google and amazon, I have set the id’s in the override to be mixed but it was still saving them out in lower case, I notes in the code the id’s had a ToLowerInvariant on them and when i removed this it seemed to save out ok.
This plugin has saved me weeks of work thanks loads
Hi,
I just picked this up.
Is there a simple mod to implement a dummy generic billing interface for standalone use?
Use case is I only have iOS/Android Basic, but I have Unity Pro main and need to test some AssetBundle functions with a mocked up payment cycle.
The UniBill demo works ok in the editor but spits an error on build for standalone.
Unibill comes with a fake billing service that is used within the editor; I have modified Unibill to use this implementation when running on standalone desktop targets, so your use case should now work.
The latest version will take a couple of days to be approved by Unity. If you need it asap then contact support@outlinegames.com.
A couple of suggestions:
More documentation on adding new custom billing services so to minimize changes downstream when updating UniBill. As pointed out @andymads this can be a pitfa in Unity so it’s critical customisation is done properly.
“The inventory editor tracks these purchasable items in an XML file located at Assets/Plugins/unibill/resources/unibillInventory.xml, which you can edit manually (or with your own tools) if you prefer.”
Again, due to updates possibly overwriting this file, it might be better to have a static UniBill configuration class where this file can be overridden with a user generated one.
Thanks for the suggestions. I have modified Unibill so that it does not include a static inventory XML file in the package, but instead will build it automatically if it does not exist. Thus Unibill updates will not overwrite any preconfigured inventory configuration.
Re: unable to retrieve product details from iTunes connect, have you reviewed the Unibill help pages? Otherwise use the same email address for support queries.
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcom/amazon/inapp/purchasing/BasePurchasingObserver;
at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
at com.android.dx.dex.file.DexFile.add(DexFile.java:163)
at com.android.dx.command.dexer.Main.processClass(Main.java:490)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
at com.android.dx.command.dexer.Main.access$400(Main.java:67)
at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
at com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.java:191)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:123)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
at com.android.dx.command.dexer.Main.processOne(Main.java:422)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
at com.android.dx.command.dexer.Main.run(Main.java:209)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:91)
at sun.reflect.NativeMeth
This might be because you have two versions of the Amazon SDK Jar within your Assets folder.
Is this a clean import of Unibill or did you upgrade Unibill to the latest version? The version of the Amazon SDK bundled with Unibill was recently changed, which might be the cause if you upgraded your installation.