Adding button to restore purchases

On platforms that support it (Google Play and Universal Windows Applications, most notably), if you purchase something, uninstall, and then reinstall a game using Unity IAP, it automatically restores any products the user owns during the first initialization following reinstallation. For those on iOS, users must have the ability to restore their purchases via a button due to Apple requiring them to reauthenticate their password before it happens. Not doing so will prevent our game from being accepted on the iOS App Store, so it's a good idea to include this functionality if we wish to deploy there, as follows:

  1. Go to the Hierarchy window and select the Remove Ads button. Once selected, duplicate it by pressing ...

Get Unity 2017 Mobile Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.