Can't download price from Google Console metadata using Codeless IAP

You said “provide either a price or an ID”
But when I create a new product, it is already “price = 0”, and I can only change it and cannot delete at all.
3343117--261121--upload_2018-1-5_18-3-26.png
Because of it, it always written 4.99 on the button, even if I change the price in the Console.
If I do not use Visual IAP Catalog and create purchases using code like
buyButton.text = product.metadata.localizedPriceString , it works okay.
Is it a Unity bug?

Sorry, I don’t quite follow. Didn’t you change it from 0 to 4.99? I just tested here on Unity 2017.3, and I can easily change the price in that field. Perhaps what I’m missing is your mention “change the price in the Console”. The Console simply displays program output, can you elaborate? Edit - I see that you probably meant the Google Console and not the Unity Console. Keep in mind that you are setting an override for the Google price, so this would be expected behavior.

Yes, I meant Google Console (Developer Panel).
The problem is that I quote the price in Google, but when I launch the game, the price in the store is still used from the local “Price” field (highlighted in the screenshot), and this field can not be cleared.
Today I even tried to change platform to iOS – it still uses price from this field despite it related to Google Configuration!

So that price that you have circled in Red in the screenshot is a static text field for you, and cannot be edited? Did you originally place the 4.99 value in there, but now you cannot change it?

No, I can change this input field, but I cannot clear it! So it prevents fetching the price from Google Dev Console.

@hottabych Apologies, I see what you mean, and is what you originally described. Sorry about that, I am seeing the same thing. I am checking with the IAP team now, and I will keep you updated

@hottabych I met with the IAP team today, and they plan to address this issue in a future release. Thank you for the heads up, and apologies on the inconvenience. As a workaround, make a back up of your project first, then delete the Assets/UnityPurchasing and Assets/UnityChannel folders, and reimport IAP. This should rebuild your product catalog to the default settings.

1 Like

There’s new version of IAP, but this issue is still not fixed :frowning:

Are you able to move forward with the mentioned workaround in the meantime?

No.
I deleted those folders and reimported IAP package. The problem persists.
3461714--274586--upload_2018-4-14_8-8-39.png
When I create a new Product in catalog, it’s already “Price: 0”. And it prevents fetching the price metadata from Google Console or from App Store Developer Panel.

up

In discussing with the IAP team, this issue should be addressed in the next IAP release, currently scheduled for mid-September.

1 Like

Hi,

I have a similar question. I put my price as: 0 and want to use the price from the “Price Template”, which I hope I can display the product price download from the Google Play Console using “productCatalogItem.metadata.localizedPriceString”.

At the moment productCatalogItem.metadata.localizedPriceString return 0 which is what I have on under"Price" field.

3611629--293677--Capture.PNG

@hottabych @Gamrek I want to confirm that you are testing this behavior on an actual device, and not in the Editor. Can you confirm?

@JeffDUnity3D Hi I was only testing it with my editor. I have not tested it on actual device yet.

Prices are not downloaded from Google in the Editor, only on a device.

For me editing the generated .csv file worked

  • set the price to 0

3722689--308167--upload_2018-9-26_17-29-21.png

  • after the export to .csv, edit “auto fill prices” to false.

  • When exporting from the google-developer also yields false for pricing template entries
  • “Pricing Template ID” is the number you can see in you Google Console/Settings/Pricing Templates, it wont accepts the name
  • beware that if your csv editing application might make the file incompatible, you will get this error then

“The CSV columns need to be ‘Product ID,Published State,Purchase Type,Auto Translate,Locale; Title; Description,Auto Fill Prices,Price,Pricing Template ID’.”

hope it solves that for you

1 Like

@Marrt How does downloading and editing a file affect the behavior when running a game in the Unity Editor?

Worded it badly, it doesn’t. i was taking about the error when you edit the .csv before uploading it to the Google Play Console:
3723220--308221--upload_2018-9-26_19-44-24.png

However, suddenly i got a different problem in Unity IAP-Catalog, i can’t export a .csv anymore
Error Message

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Purchasing.ProductCatalogEditor+ProductCatalogExportWindow.ExportHelper (IProductCatalogExporter exporter, System.String path)
UnityEditor.Purchasing.ProductCatalogEditor+ProductCatalogExportWindow.Export (IProductCatalogExporter exporter)
UnityEditor.Purchasing.ProductCatalogEditor+ProductCatalogExportWindow.OnGUI (Rect rect)
UnityEditor.PopupWindow.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/PopupWindow.cs:92)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:104)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:216)

Please try on a new project (easiest probably). What version of Unity and IAP? What’s changed since you did it last time?