Disabling PlayerPrefs saving?

More
7 years 11 months ago #1479 by Erikoinen
Hey Frank,

I read somewhere (documentation?) that the I2 localization plugin saves and loads the localization keys using PlayerPrefs.

I'm having a following issue:
I've previously localized my game and made an iOS build for it. Everything worked fine. Then I added more localization items to it, and made another build, but they don't seem to appear there, even though the old ones do. They do work in Unity though. I also tried deleting the game first and re-installing.

What I suspect to be the problem is that I'm using a plugin that saves and loads all PlayerPrefs automatically to/from iCloud, so maybe the localization can't update itself ever since the iCloud saved PlayerPrefs is always overriding it? Is there a way to disable the PlayerPrefs part of the I2 plugin?

Any insight or tips please, thank you. :)

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #1480 by Erikoinen
Just read some previous threads about similar stuff, where you suggested to have auto update as Never.

Maybe in my case is should be Always?

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #1481 by Erikoinen
Yup, that seemed to fix it! All is right with the world again.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #1495 by Frank
Replied by Frank on topic Disabling PlayerPrefs saving?
Hi,
There used to be a problem with how the I2L handled the downloaded data which sometimes used old data from the download cache in the PlayerPrefs instead of the new one from the I2Languages or the Spreadsheet.
That was fixed in 2.6.6a3.

If you are not currently in that version or newer, please download it from the beta folder and that should fix your issue!

Hope that helps, and please, let me know if the problem continues!

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago #1554 by wagenheimer

Frank wrote: That was fixed in 2.6.6a3.


I have this exact issue too. And I'm using 2.6.6b1, with auto update "Never"..

But yeah, the question remains: how to disable PlayerPrefs?

Please Log in or Create an account to join the conversation.

More
7 years 9 months ago - 7 years 9 months ago #1555 by Frank
Replied by Frank on topic Disabling PlayerPrefs saving?

I have this exact issue too. And I'm using 2.6.6b1, with auto update "Never"..


When you say that you have the exact issue, if you deploy a build to a device, is the device showing old (cached) localization?
That was fixed in the version you have and if you are seeing that issue again, is certainly a new bug.
When auto-update is set to Never, the plugin always uses the localization stored in the I2Languages.prefab.

The only things that is stored in the PlayerPrefs is the CurrentLanguage (if the user manually changes it) so that it could be "remembered" on future sessions.

If that's not the case, can you please, let me know what steps you do to get the problem. I have been trying several ways and they all work fine.

But yeah, the question remains: how to disable PlayerPrefs?


The only places that use the PlayerPrefs if UpdateFrequency is Never are:

E:\Work\Unity Plugins\Assets\I2\Localization\Scripts\LocalizationManager.cs (line 111)
you can comment this two lines if you don't need PlayerPrefs
				if (RememberLanguage)
					PlayerPrefs.SetString ("I2 Language", LanguageName);

E:\Work\Unity Plugins\Assets\I2\Localization\Scripts\LocalizationManager.cs (line 125)
			string SavedLanguage = PlayerPrefs.GetString ("I2 Language", string.Empty);
That last line can be replaced by
			string SavedLanguage = string.Empty;


Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
Last edit: 7 years 9 months ago by Frank.

Please Log in or Create an account to join the conversation.

Time to create page: 0.319 seconds
Template by JoomlaShine