• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by LordZephyr · Aug 25, 2013 at 12:23 PM · apppurchasein app purchasein

What is the best way for me to have In-App Purchases?

I am interested in creating an app with in app purchases but not power-usp, gold, or the like. I would like my app to be more like a "shell" where you can purchase other games of the same theme within the main app. I would like it to be somewhat like the iOS way you scroll through your albums on the iPhone by swiping left and right but instead of music, it would be separate games that you would buy within the app and then tap on the "cover art" to play. It would be something like the Atari app with all the games within it.

Now, here's my question. What is the best way for me to do that? I have looked at Unibill and SOOMlA for in app purchasing but I can't figure which is best for what I want to do OR if there is something even better that I don't know about.

I would appreciate any help you may offer. Thanks so much in advance!!! Tom

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Voxel-Busters · Nov 24, 2015 at 08:43 PM 0
Share

Try using Cross Platform Native Plugins. Very easy setup, lots of features, unified API's and supports both iOS and Android platforms.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Narv · Aug 25, 2013 at 02:41 PM

Check out Prime 31's website. They have tons of stuff for all the mobile platforms: http://prime31.com/plugins#

Only issue is it gets expensive fast if you want to buy a lot.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LordZephyr · Aug 26, 2013 at 01:07 PM 0
Share

Thanks for your response, @Narv. I am still very confused. The information on the site doesn't give much information about how to do what I want to do (or how much they will charge). And that goes for all the sites for in-app purchasing.

I'm wondering if you or anyone else might know if there is any form of instruction (a book, video, or document) that would give step-by-step instruction as to HOW to make in-app purchases for your apps. I have checked YouTube, Amazon, and iBooks but there is nothing that $$anonymous$$ches you how to do it.

I would really appreciate it if you (or anyone) could share a source for what I'm trying to do.

Thanks so much! $$anonymous$$

avatar image Narv · Aug 26, 2013 at 08:08 PM 1
Share

So the problem with in-app purchases is that it depends on the platform you are targeting. iOS implements it differently than Android that implements it differently than Windows Phone, etc. So because of this, Unity does not innately support in-app purchases.

HOWEVER, Unity does support the addition of plugins via DLLs. So for android, you could write the android code for an in-app purchase in android's native language of Java, and then compile the classes into a .jar file or use a different program to compile it into a DLL (there are other pieces of software out there that will wrap your functions). You can then call these DLL functions from your C# or JavaScript (UnityScript) code in the game. You will also need to make changes to the manifest files that go with the apps for the operating system to know how to properly handle your app.

Plugins like Prime 31 have done most of the heavy lifting for you, which is why it costs so much. Basically, they have wrapped generic enough function calls into a DLL for you, so you can call those functions in your program.

As stated above, each platform implements things differently, so there is no 1 DLL to rule them all, which is why most of the in-app purchases assets you will find are for a particular platform.

If you want to implement this on your own, then you would need to first find the platform you are targeting and learn how to implement an in-app purchase in the system's native language (iOS: Objective-C Android: Java Windows (Phone) 8: C# ) and then write a plugin (.jar or .dll) to expose methods to Unity that you want to be able to use (such as placing an actual purchase).

Then include that wrapper into your plugins folder and then implement it into your code.

  • For your question speficially: you would have setup in the app store of choice which game you want to have purchased and the price. Then you would have a function for displaying the price and one for sending the request to purchase with a callback event with a status variable saying if it was completed, cancelled, etc. If it was completed, you can either A.) have the "game" already included in your app and now you flip a switch somewhere and they can access the game. or B.) you use assetbundles (Pro feature) and stream the content in or download it to run. As for the layout, that is done in Unity's GUI features OR an asset for UI such as NGUI (or making your own textured planes that look like buttons with scripts on them, but that's a different question).

Hope that helps, should be everything you need if you wish to implement this yourself, though if you have the money (and it does get expensive quickly if you're hitting a lot of platform) I would recommend using an asset from the store or from prime31 (seems to be the best so far, with rather good support).

avatar image LordZephyr · Aug 27, 2013 at 12:02 AM 0
Share

Wow! That's exactly what I was looking for, @Narv. Thanks so much for your totally complete answer! I really appreciate your time. I'm wonder... If I could ask one more thing... If I'm developing in Unity for the iOS, is Prime31 the best plugin to go with? I have seen three so far. Prime31, Unibill, and SOO$$anonymous$$LA. I just don't know which is best for what I'm doing. I just feel like I'm having a little bit more to my in app purchases than some extra gold.

Thanks again for your help!!! $$anonymous$$

avatar image
0

Answer by Banderous · Feb 06, 2014 at 10:41 PM

Unibill will let you do all that you suggest, and do so across 6 different platforms.

Unibill is the one plugin that works exactly the same way on every platform, taking care of all platform differences for you, not to mention managing virtual currencies automatically.

Note - I am the author of Unibill.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

IAP Restore purchase on Android "Already Recorded Transaction" 0 Answers

u3dxt - in-app purchase ONLY 1 Answer

What's the Logic for In App Purchases? 2 Answers

In app purchase of content 0 Answers

How to set up a non digital item store inside app? 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges