Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

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,130
    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/
     

    Attached Files:

    nikescar and Zlino like this.
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,130
    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.