BooleanSwitch handles floats different in editor and on Android

Issue #105 resolved
Christian Oeing repo owner created an issue

From https://forum.unity.com/threads/released-data-bind-for-unity.298471/page-9#post-8527370

in the end Convert.ChangeType() seems to be culture-independent in Unity 2019 and is dependent in Unity 2020.

That's why after upgrading Unity to 2020 everything worked on my laptop (where culture info was resolved to en-us) and not on my phone (where it was resolved to de-de).

So in the editor "0.5" was converted to 0.5 but on my phone it was converted to 1.

Comments (3)

  1. Christian Oeing reporter

    The fix was straight-forward, by using CultureInfo.InvariantCulture when using Convert.ChangeType in ReflectionUtils.TryConvertValue.

  2. Log in to comment