Search Unity

Sample IAP Project

Discussion in 'Unity IAP' started by JeffDUnity3D, May 2, 2018.

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

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    Please find attached a sample Unity project that demonstrates several uses of Unity IAP. The Toggle button allows you to switch between returning Pending and Complete from ProcessPurchase at runtime, and the Complete button allows you to call and test ConfirmPendingPurchase. The code is provided as-is, and should not be used in Production without complete testing. It is recommended to monitor the device logs using adb logcat as described here https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/ A 3 minute video showing how to download and use the IAP Sample Project is here

     

    Attached Files:

    Last edited: Feb 15, 2019
    nikescar and Zlino like this.
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,685
    Here is a sample Unity project to demonstrate Codeless IAP. There are two buttons, one to purchase a consumable ("Gold"), and one to purchase a non-consumable ("No Ads"). The IAP Listener is currently disabled, but can be enabled to test behavior when the Codeless IAP buttons might not be enabled on app start.
     

    Attached Files:

    nikescar likes this.
Thread Status:
Not open for further replies.