BooleanSwitch handles floats different in editor and on Android
Issue #105
resolved
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)
-
reporter -
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 1.23 (automated comment)
- Log in to comment
The fix was straight-forward, by using
CultureInfo.InvariantCulture
when usingConvert.ChangeType
inReflectionUtils.TryConvertValue
.