itch.io is community of indie game creators and players

Devlogs

Score update for windows

Toilet Shooter
A downloadable game for Windows and macOS

In the V3 version, I improved the display of the score with a right scrollview but also found the reason why on Windows all score where about zero.

The issue is due to the culture. My server store datas in English but most of my players are not English and so the decimal separator is quite different.

For those using unity here is the trick to work around this kind of issue and being able to parse float dans single the right way. Add in where your main awake should be.

string CultureName = Thread.CurrentThread.CurrentCulture.Name;

        CultureInfo ci = new CultureInfo(CultureName);

        if (ci.NumberFormat.NumberDecimalSeparator != ".")

        {

            ci.NumberFormat.NumberDecimalSeparator = ".";

            Thread.CurrentThread.CurrentCulture = ci;

        }

Enjoy the V3.
Download Toilet Shooter
Leave a comment