Shopify / unity-buy-sdk

The Unity Buy SDK allows Unity developers to query and sell products from Shopify directly in Unity.
https://help.shopify.com/api/sdks/custom-storefront/unity-buy-sdk
MIT License
67 stars 23 forks source link

Unity platforms supported #522

Open yosun opened 6 years ago

yosun commented 6 years ago

Hi! Considering using this SDK for TechCrunch Hackathon. Just checking if you support Unity WebGL as well? I see in Plugins, there is just Android - is that the only supported platform/does this mean you don't support iOS as well?

mikkoh commented 6 years ago

Hey @yosun this sounds exciting. We have not tested with WebGL builds however this should work as we use Unity's WWW and this should work in the webgl builds.

This is where the actual Network communication happens: https://github.com/Shopify/unity-buy-sdk/blob/cc0e3bfd75f3adb2f82d8eaf21ffa1bf40ae3054/Assets/Shopify/Unity/SDK/UnityLoader.cs

For iOS and Android really the only features we bring is accelerated checkouts and checkouts via browsers in game. These are behind compiler flags so again your webgl build should work.

Would love to know if it works. Let us know if you have issues.

purutan commented 2 years ago

I am wondering if it will work with WebGL. When I run the sample, I get the following error when I click the checkout button.

PlatformNotSupportedException: Sorry. We haven't implemented web checkout for this platform yet.
  at Shopify.Unity.Cart.CheckoutWithWebView (Shopify.Unity.SDK.CheckoutSuccessCallback success, Shopify.Unity.SDK.CheckoutCancelCallback cancelled, Shopify.Unity.SDK.CheckoutFailureCallback failure) [0x00000] in <00000000000000000000000000000000>:0