Float values fetched are parsed incorrectly

Issue #12 new
Dario Bonfanti created an issue

I'm using unity 2018.3.8f1 and fetching some data from the analytics. I'm getting x, y and z from a custom event.

The value in the json or tsv report is "296.8462", while the value that is parsed through float.TryParse(n) is 2968462 which is just wrong

I did some debugging to find the cause and I managed to solve the issue using

float.TryParse("296.8462", System.Globalization.NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out f);

This is a major bug as it prevents the correct display of heatmaps

EDIT: Turns out also MINIJson.cs requires some fixing as it's parsing/serializing doubles in the wrong way.

I'll attach the corrected files

Comments (5)

  1. Log in to comment