Huge delay and freeze on first run on iOS
Please Log in or Create an account to join the conversation.
The plugin always uses the Local translations to localize.
However, every some time, it contacts google and downloads new updated translations. This process happens in the background, while the game is playing.
What will happen is that after you get the data from google, the game suddenly re-localize all text/fonts/images/etc.
But the game should never be waiting for the data from google.
Normally, when I see a lag when localizing, is when the localization changes fonts/images that require Unity to load all those assets.
Also, when using dynamic fonts and switching to a language with different characters (e.g. english->chinese) or in you case, when opening a window with lot of new text. If you are using dynamic fonts, every time a new character or font size is used, Unity has to recreate the font atlas texture and add the new character/size. That's usually the biggest cause for lag.
What I have done to reduce the lag is to not use dynamic fonts. Instead I'm using pre-rendered bitmap fonts or an SDF font like TextMesh Pro or Smart Edge.
If you want to try disabling the updates from google, you can open your Language Source, and in the google spreadsheet tab, changes the Update frequency to "None". That wont prevent the source to import the spreadsheet every time you manually click the "Import" button, but will stop downloading translations when running the game.
Nonetheless, As soon as I get back, I will debug the code a bit to make sure that there is no regression in 2.6.0 that could stall the game while waiting for google.
Thanks,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Frank wrote: Hi,
The plugin always uses the Local translations to localize.
However, every some time, it contacts google and downloads new updated translations. This process happens in the background, while the game is playing.
What will happen is that after you get the data from google, the game suddenly re-localize all text/fonts/images/etc.
But the game should never be waiting for the data from google.
Normally, when I see a lag when localizing, is when the localization changes fonts/images that require Unity to load all those assets.
Also, when using dynamic fonts and switching to a language with different characters (e.g. english->chinese) or in you case, when opening a window with lot of new text. If you are using dynamic fonts, every time a new character or font size is used, Unity has to recreate the font atlas texture and add the new character/size. That's usually the biggest cause for lag.
What I have done to reduce the lag is to not use dynamic fonts. Instead I'm using pre-rendered bitmap fonts or an SDF font like TextMesh Pro or Smart Edge.
If you want to try disabling the updates from google, you can open your Language Source, and in the google spreadsheet tab, changes the Update frequency to "None". That wont prevent the source to import the spreadsheet every time you manually click the "Import" button, but will stop downloading translations when running the game.
Nonetheless, As soon as I get back, I will debug the code a bit to make sure that there is no regression in 2.6.0 that could stall the game while waiting for google.
Thanks,
Frank
Please Log in or Create an account to join the conversation.