Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. Unity 2017.3 has arrived! Read about it here.
    Dismiss Notice
  3. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[Solved] How do products get automatically restored?

Discussion in 'Unity IAP' started by claris, Apr 21, 2017.

Thread Status:
Not open for further replies.
  1. claris

    claris

    Joined:
    Aug 5, 2015
    Posts:
    6
    The documentation says that "On platforms that support it (e.g. Google Play and Universal Windows Applications) Unity IAP automatically restores any products the user owns during the first initialization following reinstallation; the ProcessPurchase method of your IStoreListener will be called for each owned item."

    I have implemented the IAP codes on my store page, but I am not sure if a user reinstalls the app, without going to the store page, how does Unity restore the products so that the correct games are unlocked? On the menu screen, the app should already be able to tell which products the user has purchased. Do I have to include the IAP codes on the menu screen to do that?
     
  2. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    40
    Hi.
    You don't have to attach your IAP codes on store page. You can attach it on any GameObject.
    We have a "IAP Demo" scene in Plugins/UnityPurchasing/scenes. In this demo, we attached IAPDemo.cs on UnityIAP object. So once the scene is loaded, Unity IAP is initialized. And then you'll get all information you need.
     
Thread Status:
Not open for further replies.