Lots of issues related to 3.1.0 update

We are using Unity 2020.3.5f1 and upgraded from Unity Purchasing v2.2.2

1) We had to manually figure out and fix many incorrect .asmdef references;
2) Unity “tangle” files are tricky to update, especially due to the fact that…
2.1) Tangle files don’t have their own Assembly Definition, which we had to create in order to use them in our own assemblies but now led to update issues;
2.2) Ok, we created that Assembly Definition but had to reference some “UnityEngine.Purchasing.Security*” assemblies to compile our project. Now we are getting a “NotImplementedException: The method or operation is not implemented.” as soon as we launch Play Mode, when we create a new CrossPlatformValidator instance.
3) We haven’t run into this issue yet (since we are stuck in a previous step), but every time we updated the Unity IAP plugin, we had to add a script to FakeStore to “DontDestroyOnLoad”. This will probably become an issue now that the plugin code is imported via Packages and can’t be properly modified.
4) We also have yet to check this, but as a heads up: it would be nice to be able to validate Google Play and AppStore receipts on other platforms (WebGL, for example). To make that work, in previous versions we had to modify the code and/or replace DLLs for this to work.

@xLeo All your points are expected as we transition to Package Manager. Yes, if you are using asmdef references, you will need to update them. However, natively they are not required. I don’t use them in the Sample IAP Project for example, and it works without issue. Not Implemented is expected on non-supported platforms like in the Editor. You’ll want to wrap it in a Try/Catch block like in the sample project. So you are using WebGL (browser based) on an iOS device? What object did you need add the DontDestroyOnLoad, are you using Codeless? Is this for the object that the singleton/IAP Manager class is attached to?

I don’t use them in the Sample IAP Project for example, and it works without issue.
I will check that. Is the Sample IAP Project under an asmdef of its own?

Not Implemented is expected on non-supported platforms like in the Editor. You’ll want to wrap it in a Try/Catch block like in the sample project. So you are using WebGL (browser based) on an iOS device?
I understand the reasoning, but it should be possible to validate receipts from other platforms on any platforms (I think we just enabled it on Editor and WebGL by adding some #ifdef conditions on the source code),
In my opinion, it should be possible to locally validate a receipt from iOS on Android, for example. That way the user can log in with the same account and still enjoy its subscription benefits, for example.

What object did you need add the DontDestroyOnLoad, are you using Codeless? Is this for the object that the singleton/IAP Manager class is attached to?
We had to add the DontDestroyOnLoad to the FakeStore prefab.

You wouldn’t want to use the FakeStorePrefab in a released game, so you can avoid that. In a live app, you would connect to the actual store, not a fake store. The receipt validator does work on iOS and Android. It doesn’t validate in the Editor because there is no back end store to connect to, and no receipts. ifdef’s would certainly work too instead of a Try/Catch block. The Sample IAP Project doesn’t use any (user-added) asmdefs.

- Fake Store Prefab:
The problem with the Fake Store prefab is that we initialize it as soon as the app launches, so the screen is destroyed when we change scenes. What you are suggesting is to implement a whole workaround for it on the Editor while it could simply be solved by adding a single line on the Package code?
Besides that, we also use FakeStore for some Internal and Closed tests.

- Receipt Validation:
We use Receipt validation on Editor to validate receipts saved remotely, and also to help figure out issues that may happen on the built players.
I understand that the ideal way is to have a remote custom validator that is specific to every store, but why not have the option to validate on Editor or another platform?

Overall, I understand the need to change some feature designs in a plugin, but I find a few of them more of an extra hurdle than an improvement.

You can’t validate on the Editor because there are no receipts available to do so. We don’t support other platforms, so there are no receipts there either to validate. Yes, we are aware of the FakeStore prefab issue, your point is taken We are working on that in a future release.

1 Like