Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Unity Purchasing 3.0.2 shows as 3.0.1

Discussion in 'Unity IAP' started by PeachyPixels, Apr 2, 2021.

  1. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    680
    As per the title, I updated to 3.0.2 but the package version is still defined as 3.0.1

    Code (CSharp):
    1.   public class StandardPurchasingModule : AbstractPurchasingModule, IAndroidStoreSelection, IStoreConfiguration
    2.   {
    3.     public const string k_PackageVersion = "3.0.1";
    Unity's own logging must use this as even that reports it as 3.0.1

    UnityIAP Version: 3.0.1
     
    makaka-org likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Thank you for this report. Can you confirm what version shows in the device logs?
     
  3. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    680
    That is reporting 3.0.1 as well (as above) so am assuming it's using the same constant.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, it's a mistake. 3.0.2 is a documentation release only
     
    PeachyPixels likes this.
  5. nicholasr

    nicholasr

    Unity Technologies

    Joined:
    Aug 15, 2015
    Posts:
    183
    Sorry for the confusion! Thank you for the report of need for clarification @PeachyPixels !

    The 3.0.2 "only documentation" release is the basis for this new link on our public website:

    1. "Latest" https://docs.unity3d.com/Packages/com.unity.purchasing@latest/index.html
    2. ... which redirects to the current "3.0" Manual https://docs.unity3d.com/Packages/com.unity.purchasing@3.0/manual/index.html
    3. ... and also contains the current "3.0" API Script Reference https://docs.unity3d.com/Packages/com.unity.purchasing@3.0/api/index.html
     
    PeachyPixels likes this.
  6. nicholasr

    nicholasr

    Unity Technologies

    Joined:
    Aug 15, 2015
    Posts:
    183
    And, StandardPurchasingManager.k_PackageVersion is a bug which unfortunately will be with us for the remainder of the 3.x.x release.

    Thank you for pointing this out.

    We will be deprecating this public API, and plan to add a new method "Version" that does the same thing, in a future release. Then finishing by removing k_PackageVersion in 4.x.x.

    The k_PackageVersion signature, it is a constant [readonly would have been a better choice], and as such its string data could potentially be copied into a DLL...resulting in tighter-coupling than we want. E.g. the package could hypothetically be updated to 3.0.4 but a DLL would still have a cached copy of the value at 3.0.1, which is not what we want. So we are deprecating it, and replacing it with a method.
     
    PeachyPixels likes this.
  7. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    680
    Hi Nicholas,

    Thanks for the update and the new documentation. The old documents were quite dated, so it's great to see them updated. I'll go through them and double check my current code & setup matches the new docs & IAP project.

    As for the version number, I understand and good to hear it's on the radar.
     
  8. PeachyPixels

    PeachyPixels

    Joined:
    Feb 17, 2018
    Posts:
    680
    Hi Nicholas,

    I just updated the IAP package to 3.1.0 and see that k_PackageVersion is now marked as deprecated (as you mentioned above)

    So I switched to using...

    Code (CSharp):
    1. StandardPurchasingModule.Instance().Version
    But that's reporting the version as 3.0.2

    Just thought I'd let you know in-case that is not intentional.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, we are aware, thanks.
     
    PeachyPixels likes this.