[exception] "key already exists in dictionary"

More
6 years 3 months ago #3225 by coty
I couldn't find an email anywhere to send this directly to whoever the hell makes this plugin. So here's a forum post.

I updated from unity 2017 to 2018 and so also updated i2, since it was broken.

On the unity 2018.2.6f1, with the latest asset store release of i2 localization (9/6/2018), if you have the same material selected on the secondary term of any localization script attached to text, you get thrown a ton of errors and everything is broken forever.

I fixed it by going into LanguageSource_Assets.cs, I had to change line 25 from
            mAssetDictionary = Assets.Distinct().ToDictionary(o => o.name);
to
            mAssetDictionary = Assets.Distinct()
                .GroupBy(o => o.name)
                .ToDictionary(g => g.Key, g => g.First());

Please update the store version to also have this fix. And please add a support email somewhere. Thanks.

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

More
6 years 3 months ago #3226 by Frank
Hi,
I'm "whoever the hell makes this plugin"

And please add a support email somewhere

My email is everywhere:
At the end of the Assetstore description, there is an email link
In the readme 4th line of the readme.txt in the plugin is the email.
And in one of the sticky threads in this forum, I list my email
In the unity forum (2nd post, there is my email)
etc.

But please, if you can't find it, it means that its not shown enough. Can you please, let me know where did you look? So that I could put them where developers usually look!

Also, its better to have questions in the forum instead of in the email. That way I can follow the question thread better and other developers facing the same issue could benefit from the answers.

if you have the same material selected on the secondary term of any localization script attached to text


I don't quite get what you are describing. Do you mean, that if you have a material assigned to the second term it breaks? That's exactly how the example scene is setup.

However, from your fix, I guess that what you are facing is having two assets in the list with the same name. For example (a font "ARIAL" and a material "ARIAL").
I will add a fix for this and include it in the next beta.

I will add the line you changed, plus some warning in the Assets list to warn against using several assets with the same name.

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

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

More
6 years 3 months ago #3227 by coty
some places I looked, help -> i2 in unity takes you to www.inter-illusion.com/assets/I2Localiza...alizationManual.html (control+f email, no results).
asset store -> i2 -> support website forwards straight to forums (means you'd have to dig to find anything)

you are right about email being in asset store description, didnt think to look there. my bad

>I don't quite get what you are describing. Do you mean, that if you have a material assigned to the second term it breaks?

yeah this, I had a secondary term where multiple languages had the same material assigned. this broke the editor

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

Time to create page: 0.171 seconds
Template by JoomlaShine