Apologies, think I mislead with my post. If you look at my original post the IAP.Init is called then I yield until it’s initialised (waiting 2 seconds each time). In this case, the init fails, but does not raise a failed event, so just keeps retrying indefinitely.
The purchase happens from within the app (well after init) so not relevant here. Apologies for misleading.
Well that’s a shame if true, I’d based my entire beta programme around the basis of a private audience. I didn’t feel that was something that even needed questioning in terms of Unity support. Surely it should make no difference? If you could please confirm if that’s the case as I will need to go away and re-think my entire strategy.
I searched through the forum btw and found many instances of others having the same issue…
IL2CPP seems to be a theme here, maybe that’s a factor?
The third thread also mentions this…
For any unfortunate soul struggling to get UWP initialization working and stumbling on this thread… As was suggested previously here, there really is a delay of 24-48 hours after finalizing submission and seeing “In the Store” on the dev center dashboard before IAP initialization works. That was our experience anyhow.
Are there any plans to improve support for the Microsoft Store? I see Unity saying they support it, but too many people posting issues and\or abandoning it for an alternate solution.
The mock config code you showed looks good, just make sure it’s set before initializing IAP. You mentioned In-Editor? Do you mean in Play-In-Editor? Mock UWP billing only works in UWP builds, not in the Editor. I don’t believe there’s any way to emulate UWP In-Editor.
Or am I misunderstanding? Please correct me if I am.
Regarding the CrossPlatformValidator, just make sure not to create it on Non-Google, Non-Apple platforms until we release the next version. You can temporarily copy the #if guards from the Tangle files in the meantime and wrap your calls in them, or you can manually remove them from your Tangle files. The new version will essentially do the latter.
Apologies John, tiredness induced typo. Was late here and had been a long day Meant to say local build. Stripping out irrelevant stuff, my code is as follows…
As per my original post, mine isn’t a continuous poll. Rather it throws a single generic System.Exception and fails to call the init failed event as a result.
The link you sent states “UWP - Additional logging during initialization to diagnose developer portal misconfigurations” but I see no such logging in the log. Just the generic exception. That was IAP 2.0.X and I’m using 3.0.X so is this a regression?
Are you able to confirm 100% if it’s the private audience that’s causing the issue please?
What about if it’s a public audience (visibility) but still hidden \ stop acquisition? (discoverability, see attachment)
I only ask as the screenshots from the Unity Windows IAP Configuration link are very outdated now and don’t cover discoverability.
Sorry I’m not certain on the audience type, I was hoping it might be an easy test for you. We are discussing internally on the best path forward, we may need to update IAP with the latest Windows Store namespace in a future release. But unfortunately we don’t have an immediate answer for you.
Try reversing your call order here. There’s some strange internal esoterics in the WindowsStore’s internal factory. It seems once it’s been made with Mock, or non-mock it’s locked and not changeable. I think adding products does this (setting it up as non-mock and locking that).
Tbh the mock store code (in that order) has been working just fine for a long time now, but I will happily switch it around if you think it’s a better approach.
But coroutines aren’t threads, or do you mean in the literal sense?
I have it all working now (so init in a coroutine must be ok) but it’s late again and I need to switch off I’ll report back tomorrow with the findings.
I was suggesting that you try the code we are familiar with so we are on the same page, we’ve seen some timing issues with the store APIs. If you can reproduce with common code, then the more likely we can do the same and hopefully identify and address the issue.
Before I post my findings\resolution, I’m seeing something that I would be grateful if you could clarify please.
So I was testing the add-on purchase and after purchasing it in-game (then re-opening the game) I’m noticing the following in the log (some of it is mine, others Unity)…
So I uninstalled the app and re-installed to see what would happen.
The first run logs were the same as above, but a second run now shows this now…
UnityIAP Version: 3.0.1
UnityIAPWin8:Begin PollForProducts() persistent = True, delay = 0, productsOnly = False
UnityIAPWin8:Building full product list with existing purchases
UnityIAPWin8:Fake transactionID: Set transactionMap[] = -12345678
Unity IAP version [3.0.1]
Already recorded transaction -12345678
Fulfilling transaction -12345678
ProductID
UnityIAPWin8:Consuming:
UnityIAPWin8:Exception consuming : Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx). (non-fatal)
Everything ‘appears’ to be working as expected, no visual errors and the product is restored on first run. I found this thread that has some similarity and that was two years ago…
There are just too many kinks with Unity’s Windows implementation of IAP. It really doesn’t inspire confidence.
I know it’s not your fault, but I wish Unity would take Windows seriously. They say they support it yet I’ve just hit one issue or limitation after the other.
I’ve wasted an entire week trying to get Unity IAP running (on the MS store) when it’s been running (on the mock store) fine for months now.
Maybe you could suggest to the powers to be that they look at improving the existing implementation first please?
I know you say an upgrade is in the works (moving to the newer MS API hopefully) but that’s realistically a long way off. So why not improve what’s there in the meantime.
Sorry just incredibly frustrated. It looks like I’ll have to release the game on Windows with underlying errors and strangeness and just hope it doesn’t turn into a support nightmare.