Problem: NGUI Label's "Term" corrupted when I run

More
8 years 5 months ago - 8 years 5 months ago #1581 by CGR
When I'm using the editor, everything looks fine (except, I see some of the "broken" labels are in Bulgarian, when I'd expect them to be in English) - see attached GameNotRunning (link at the bottom, it wouldn't let me attach).
However, when I run the game, the Term key is somehow being changed - see "gameRunning" (link at the bottom, it wouldn't let me attach), and so various problems then occur.
I'm not changing the term myself. I've not written any code to interact with I2 Localization in any way, I've just done stuff via the inspector. In fact, I have the same code on two other different machine and I do not have this problem on those machines. The code is in SVN, and I can see nothing is different across the three machines: but one of them is having this problem.
I just tried deleting my "Library" folder in Unity on the "broken" machine to force it to rebuild everything, but this has not fixed the problem. I had been making changes to the "broken" project, but since I noticed the problem, I've reverted everything.

If I "refresh" my terms while the game is running, I can see the new "blank" terms appear as unassigned, and the usage-count for the "now unattached" terms drops to zero; when I quit the game, everything goes back to the way it was.

I had a somewhat similar problem the other day, where I'd edit stuff in the Localize component in the editor, but when I ran it and stepped through the code, the changes weren't making it into the game somehow (in this instance, the inspector both while running and not running was "correct", but, stepping through the code, old values were being retrieved "from somewhere") - exporting and replacing stuff via CSV "fixed" this.

I believe I've set everything up as per the instructions. I'm using Unity 4.7.2/ NGUI 3.6.8.

Is there some "secret" cache for terms etc. that I need to clear?

I'm only just starting to look at localizing my game, I've only 33 terms and 3 fonts. Do you have any idea what is going on here?


Last edit: 8 years 5 months ago by CGR. Reason: I mentioned an attachment, but I couldn't attach, so did a link instead.

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

More
8 years 5 months ago - 8 years 5 months ago #1583 by Frank
Hi,

Are you using only the I2Languages.prefab or do you have any other source instantiated in the scene?

It could be the case, that if you have a source in the scene, then the plugin is failing to know from where it should get the term (the I2Languages.prefab or the ones in your scene). I have code that detects this cases and merges them at runtime, but it could be failing. I will double check this.

If you are using Google Live Synchronization by enabling auto download of the Google Spreadsheet (i.e. setting the frequency in the google tab to anything other than NEVER), then it could be that the downloaded spreadsheet is overriding the local data. Although, in one of the latest releases I fixed this issue and shouldn't be happening. I will double check that as well :-)

If nothing of that is your case, Can you double check that the function AddSource in the LocalizationManager.cs is not been called several times once the game runs. That's the function to loads the source and adds the terms into the local dictionary for faster access.

If no luck there, then if you send me your project, or a similar one having that issue, I could look at how everything is setup and advise you of any issue and how to fix it.

link at the bottom, it wouldn't let me attach


BTW, I just checked, and the problem attaching images is that there was a limit to the size and resolution (max:800x800, 200Kb) I will try upping the resolution to account for fullscreen screenshots.

Sorry for this inconvenience,
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: 8 years 5 months ago by Frank.

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

More
8 years 4 months ago #1602 by CGR
Hi,
Sorry for the late reply.
I'm only using your I2Languages.prefab in your resources folder. I have not added any other sources, and can see in the inspector that there are none in my scene.
I have not done very much at all with my game yet, I followed the "Quick Start" instructions here, using the prefab as my source as you recommend:
inter-illusion.com/assets/I2Localization...alizationManual.html
Terms were added automatically when I added "Localize" components to my unlocalized NGUI labels. I have maybe 20 or 30 simple terms, which I'm translating into 7 European languages.

I had already turned off Google Live Synchronization (set to NEVER).

LocalizationManager.AddSource is only being called once (however, see below, I tested this on one of my machines that was not showing the problem - all three of m machines had the same source on: this was the main thing that was worrying me).

For now, I've had to remove I2Localization from my main development PC so that I can do other work on the game, so I can't further investigate the problem.
I don't think I can send the full source for the game anyway; if I resume work with I2Localization, I'll see if I can create a small "proof-of-concept" project that I can send you.
Until then, thanks anyway for your help,

Regards,
CGR.

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

Time to create page: 0.210 seconds
Template by JoomlaShine