So reading the guide over here :
https://unionassets.com/iosnative/coding-guidelines-15
I'm simply trying to get the localized price (although it seems impossible to get any information).
Following the guide I tried to declare a variable but this is the error i was hit with :
UnityException: You are not allowed to call this function when declaring a variable.
Move it to the line after without a variable declaration.
If you are using C# don't use this function in the constructor or field initializers, Instead move initialization to the Awake or Start function.
UnityEngine.GameObject..ctor (System.String name)
IOSInAppPurchaseManager.get_instance () (at Assets/Extensions/IOSNative/Market/IOSInAppPurchaseManager.cs:65)
BuyItemButton..ctor ()
I have tried moving the variable declaration after the in-app manager as initialised but then i'm hit with:
NullReferenceException: Object reference not set to an instance of an object
No matter what I do, like setting it to an instance of an object, I get this error. I have tried to contact the developer, usually he is great with his responses but I need immediate help.
Thank you!
↧