Quantcast
Channel: Questions in topic: "iap"
Viewing all articles
Browse latest Browse all 595

Amazon IAP SDK Creating a Monobehavior is not Allowed?

$
0
0
Okay, this is kinda a weird issue, but for some reason Amazon's IAP SDK is trying to create a monobehaviour in a constructor... This causes errors when i build it... This is the code in question... private AmazonIapV2Impl() {} public static IAmazonIapV2 Instance { get { return Builder.instance; } } private class Builder { // A static constructor tells the C# compiler not to mark type as beforefieldinit, and thus lazy load this class static Builder() {} internal static readonly IAmazonIapV2 instance = #if UNITY_EDITOR new AmazonIapV2UnityEditor(); #elif UNITY_ANDROID AmazonIapV2UnityAndroid.Instance; #elif __ANDROID__ AmazonIapV2Android.Instance; #else new AmazonIapV2Default(); #endif } You can see in editor it creates a new AmazonIapV2UnityEditor and it seems when i build it to the Amazon firestick it's calling the else new AmazonIapV2Default();? I never altered these classes, it's strange that Amazon seemingly released this SDK with bugs? lol Does anyone know how to fix this? I tried altering the code and removing the monobehavior, but that makes other parts break. Thanks

Viewing all articles
Browse latest Browse all 595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>