Unity Purchasing 3.0.2 shows as 3.0.1

As per the title, I updated to 3.0.2 but the package version is still defined as 3.0.1

  public class StandardPurchasingModule : AbstractPurchasingModule, IAndroidStoreSelection, IStoreConfiguration
  {
    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

1 Like

Thank you for this report. Can you confirm what version shows in the device logs?

That is reporting 3.0.1 as well (as above) so am assuming it’s using the same constant.

Yes, it’s a mistake. 3.0.2 is a documentation release only

1 Like

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 Like

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.

1 Like

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.

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…

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.

Yes, we are aware, thanks.

1 Like