Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Analytics.Transaction: converting price to decimal

Discussion in 'Unity Analytics' started by litebox, Oct 28, 2015.

  1. litebox


    Aug 29, 2011
    The price amount for iOS and Android in-apps are strings, and to send it to Analytics.Transaction() we have to convert it to decimal.
    However, For iOS this is simple:
    decimal price = decimal.Parse(product.price);
    because price contains numeric value. But for Android this is not so easy, because price is formatted like $0.99 or 14.28₴, etc.
    Are someone found a solution to get/parse Android decimal price at Unity side?