How to use Unity's IAP to unlock a scene?
I've gone through a lot of tutorials on how to implement Unity's IAP, but they all use consumables as examples. It's no wonder why, they seem pretty easy to do. But where are the non-consumable examples? I can't find any.
In particular, where are the examples on how to unlock levels with in app purchases?
Also with non-consumable objects:
Does Instantiate validate the non-consumable purchase?
Does IAP come with a receipt validation? Or is that just not necessary?
Do I need to store the purchase in user preferences, or is there a better way to save user purchase data?
I really want to use Unity's IAP...but there just isn't much information out there about it.
Answer by fredmiller12345 · Jan 13, 2017 at 11:40 PM
Hi... Did u ever get a response about unlocking a level through a purchase? I am also attempting to unlock levels through a purchase... My game doesn't have coins... I just want to sell levels for .99 per level... Should be relatively easy to do... Levels are locked... Click on Level Button to purchase... If Purchase successful... Level will open so that players can now play... But... all the tutorials I have found are based on coins as currency... Did you accomplish your iap...?.
Answer by wahaca · Jan 14, 2017 at 12:13 AM
@fredmiller12345 : Yes (I have a solution) and no (I couldn't figure out non-consumables to unlock a level). I just gave up on non-consumable purchases...all the better too. I'll explain why in a bit.
Like I hinted, I'm going to use diamonds...a consumable item. The user can purchase diamonds and then spend them to unlock the level. When the user uses diamonds to unlock a level, I will just save an unlock variable, that can be loaded at startup.
There is plenty of assets and tutorials on how to use currency, so that shouldn't be a problem.
This is not the solution I was looking for, but in the end I think it may be better. It frees up game design, making me work harder on making a better game. And allowing me greater freedom to add enhancements that can only be purchased through diamonds.
Your answer
Follow this Question
Related Questions
Integrating apple IAP 0 Answers
Unity Services and older versions of Unity 0 Answers
Unity IAP Demo Not Working on Android 1 Answer
Unity IAP Help! 0 Answers
Unity Codeless IAP, iOS, Sandbox, PurchaseFailureReason.Unknown 3 Answers