Unity3D 4.6.2p1 Problem

More
9 years 3 months ago #438 by huran438
Hi! I've updated to last I2 localization from Asset Store and catched two errors in code:

RealTimeTranslation.cs in GoogleTranslation. :
void StartTranslating( string fromCode, string toCode )
		{
			IsTranslating = true;

			// fromCode could be "auto" to autodetect the language
			//Here Error
			GoogleTranslation.Translate( OriginalText, fromCode, toCode, OnTranslationReady);
		}

And LocalizationEditor_Tools.cs:
void OnGUI_Tools()
		{
			GUILayout.Space(10);
			eToolsMode OldMode = mCurrentToolsMode;

			//Here error
			mCurrentToolsMode = (eToolsMode)GUITools.DrawShadowedTabs ((int)mCurrentToolsMode, new string[]{"Parse", "Categorize", "Merge", "No Localized", "Script"},30);
			if (mCurrentToolsMode!=OldMode)
				ClearErrors();

			switch (mCurrentToolsMode)
			{
				case eToolsMode.Parse 		: OnGUI_Tools_ParseTerms(); break;
				case eToolsMode.Categorize 	: OnGUI_Tools_Categorize(); break;
				case eToolsMode.Merge 		: OnGUI_Tools_MergeTerms(); break;
				case eToolsMode.NoLocalized : OnGUI_Tools_NoLocalized(); break;
			 	case eToolsMode.Script		: OnGUI_Tools_Script(); break;
			}
		}

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

More
9 years 3 months ago #439 by Frank
Replied by Frank on topic Unity3D 4.6.2p1 Problem
Hi,
I look into that code and don't see any script error there.

Do you mean that you are getting compile errors?
If that's the case then you need to delete the I2 folder before upgrading. Version 2.4.0 moved the GoogleTranslation class from the Editor folder into the regular scripts in order to access that feature within the game.

If you didn't delete the I2 folder before installing the new version, maybe unity left both classes (the old and the new one) and that's why you are getting a compile error. Please, be aware you have to do a copy of the I2Languages.prefab before upgrading or as suggested in the doc, save the localizations into a csv file, upgrade, then restore your translations from that csv!


BTW, Are you in 4.6.2p1 or 4.6.2f1? I haven't seen that patch version yet. Unity only shows 4.6.1p5 and 4.6.2f1. Not even the beta site has the 4.6.2p1! I'm looking forward for unity to post that patch version!


Ahh, Also, I'm sorry to say that the (2.4.0 b1) version of I2 Localization that is on the assetstore has some issues with the google synchronization, that was fixed in (2.4.0 f2) and submitted to the assetstore, but it hasn't been approved yet!
Please, get the latest 2.4.0 f2 version from the I2 Community so you don't get affected by that issue.

Thanks a lot!

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
The following user(s) said Thank You: huran438

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

More
9 years 3 months ago #440 by huran438
Replied by huran438 on topic Unity3D 4.6.2p1 Problem
Thanks a lot for your reply! It was my mistake Unity 4.6.2f1!) I will try to delete I2 folder
And then import it. But there is one more problem. I think it's better to put ScriptLocalization.cs file in other folder. Because after update or clean reinstall this file cleans too. This cause errors, in code and plugin fails to compile. Sorry for mistakes and my english)

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

More
9 years 3 months ago #441 by Frank
Replied by Frank on topic Unity3D 4.6.2p1 Problem
Yep, I love that idea.

I could move I2Languages.prefab and ScriptLocalization.cs into a new "I2\Localization Data" folder. That could solve the issue of those files been overriden by upgrades.

Another approach I was thinking on implementing is to create those file by code the first time the plugin opens in the editor if there are not already created. That way they will not be overridden by the upgrade.

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.

Time to create page: 0.173 seconds
Template by JoomlaShine