This is the weirdest thing I have ever seen. To keep things simple I have tested on 12 different computers now in the UK (with much help from friends) and everything in my game works fine, no obvious bugs at all.
But by random chance someone I was working with in Brazil tried out my game and he was experiencing a whole host of weird timing bugs, and loads of issues related to time based things. In general… everything took about 7 or 8 times as long, which causes huge issues in cut scenes, camera based movement, etc etc.
So at first I thought it was just that his PC must be rubbish lol, but it turns out he had a very decent i7 and 16gb of RAM. So then after trying a few different things and sending him some attempted fixes he eventually sent to another friend he had in Brazil and that one had the exact same bugs he had.
And just now, I have paid someone on Fiverr to test my game who lives in Brazil, and she once again had the exact same issues they did…
So, so far it has been 12 PC’s working with not a single issue and all run at the same speed (from very low end to very high end), but 3 PC’s all from Brazil don’t at all, that also have a range of pc stats… this is crazy no?
Has anyone got any clue at all why this might be the case? Could Unity somehow be doing it’s timing and events based on the users local time zone… or something? Very lost right now so any help or advice atall would be greatly appreciated, so thanks in advance for any advice or ideas on the subject! <3
Are you parsing floats/doubles/dateTime from string somewhere? It could be a locale issue. Some locales use different separators for thousands and decimals, for example. Your game could be throwing exceptions all over the place due to parsing failures. Do you have logs from those users?
You can also test this yourself by changing the Windows locale. It’s also possible to change it in the game itself:
Thread.CurrentThread.CurrentCulture = new CultureInfo("pt-BR");
1 Like
Oh my goodness I love you!!! This is amazing. I just added the line like you said:
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("pt-BR");
And I am now seeing the exact same bugs they are all seeing! So this would suggest I guess that if I force it to “en-GB” instead it will work for these people in Brazil I guess.
I will send it to them now to test, thanks so much you’re a life saver!
I’m curious what’s slowing it so much. Is it simply blasting the log output with exceptions that cause the slowness?
Also, be curious to see what the ultimate problem was, particularly if it is in your code or elsewhere, like Unity core or a Unity package, or even third party (or even .NET!).
Are you using any localization module or asset?
So I think this is what it is. I have written an entire “events” system for my game that I can write into the inspector. And it also uses a “language” I’ve written, so I can write something like:
wait [float:2.5]
move [object:this] [vector2:5,10] [float:1.5]
message [string:Say something to the player]
But ultimately it’s the bit where it interprets the time I guess from my events (the example floats from above). Not that I really understand why, because to interpret the floats all i’m doing is grabbing the “2.5” and using float.Parse(str); on it, and then using Time.deltaTime for all the timing calculations. But this events system is massive now and thousands of lines so not 100% sure if it’s just the events system. Because also I was getting some weird issues with ProCamera2D when it was running in “Brazil” mode where sometimes the camera would just be way off target. So… yeah that’s pretty much all I know unfortunately.
1 Like
NICE! Yeah, that’s it…
They might write 2.5
as 2,5
… BOOM!!
Need culture invariant parsing.
1 Like
This makes so much sense I’m glad there’s a logical explanation for it! I have never heard of decimal values being written with a comma instead of a point, but you learn something new every day! Thanks again I really appreciate it 
1 Like