Hello, I’m trying to implement Unity IAP 4.10 in my project (using Unity 2021.3.32f1).
I’ve followed this tutorial:
Downloaded the scripts and did exactly the same Llam did in that tutorial.
I’ve added 3 products in my IAP Catalog and also in my PlayDev Console:
fistful_of_shards (product ID)
pouch_of_shards (product ID)
bucket_of_shards (product ID)
If i run the project in the Unity Editor(doesn’t matter if Fake Store is true or not), there are no warnings/errors in my console and the products show up ( 3 prefabs instantiated).
If i build the project on my Android device, it works only with Fake Store checked(products shows up, and no warnings/erorrs in the Android Logcat).
If i build it on Android device without that Fake Store check, I’m having warnings in my Android Logcat with “Unavailable products”
and there are no prefabs instantiated for my products.
I’ll share my scripts and some screenshots, maybe someone can help me out to understand why those products are not working on my Android phone if the Fake Store is unchecked.
I have successfully set the Google License key in my dashboard, as shown in “screenshot1.” However, I’m facing difficulties saving the key within the Unity Editor. Before initiating this thread, I attempted to set the key multiple times in the Unity Editor (Services → In-App Purchasing), but unfortunately, the key wouldn’t save. Moreover, in the past 2-3 days, I’ve encountered a new error that I hadn’t experienced before. To my surprise, this issue remains unanswered in the Unity Forum. Nonetheless, I stumbled upon a post at Setting your Google Play Public Key in Editor vs Dashboard which suggests that setting the key in the dashboard should resolve the error. I’ve meticulously verified the Google license key’s correctness two or three times, as indicated in “screenshot2.”
Nevertheless, I don’t believe this error is the root cause of the problem I’m encountering with ‘Unavailable products.’
Regarding the core issue, I’ve attached the DemoStorePage script in the original thread message, which initializes the storeController and the products. The perplexing part is that I’ve used the same scripts and prefabs in another project that is already available on the Google Play Store, and it functions perfectly there. Setting up In-App Purchasing for the project in production took me a mere 10 minutes. However, I’ve been struggling for hours to pinpoint why I’m receiving these warnings of ‘Unavailable products’ on an Android device when I uncheck the FakeStore for a project that’s still in draft.
I have a query: Does the app’s status in the development console have any bearing on the initialization of products?
Files attached
Screenshot 1 - Google License key
Screenshot 2 - New error in the Services - In App Purchasing
Screenshot 3 - Draft/production app status
Screenshot 4 - AndroidLogcat Fakestore off
Screenshot 5 - AndroidLogcat Fakestore on
If you have some time, take a look on the DemoStorePage script I previously attached and let me know what could cause the problem I have.
I have encountered the same issue. I upgraded from IAP 4.5 to 4.10. It works fine on iOS with 4.5, but not on Android with 4.10. Have you found a solution?