Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: kittikun on February 16, 2014, 10:05:32 PM

Title: 3.5.0 compilation errors
Post by: kittikun on February 16, 2014, 10:05:32 PM
Did you forget to add the updated Localization.cs ?

Assets/NGUI/Scripts/Internal/Localization.cs(394,45): error CS0103: The name `mLocalization' does not exist in the current context

Assets/NGUI/Scripts/Internal/Localization.cs(396,46): error CS0165: Use of unassigned local variable `vals'

Assets/NGUI/Scripts/Internal/Localization.cs(399,38): error CS1502: The best overloaded method match for `System.Collections.Generic.Dictionary<string,string[]>.TryGetValue(string, out string[])' has some invalid arguments

Assets/NGUI/Scripts/Internal/Localization.cs(399,38): error CS1503: Argument `#2' cannot convert `string' expression to type `string[]'
Title: Re: 3.5.0 compilation errors
Post by: kittikun on February 16, 2014, 10:14:14 PM
To fix this, replace Localization.cs:391

  1. #if UNITY_IPHONE || UNITY_ANDROID
  2.                 string mobKey = key + " Mobile";
  3.  
  4.                 if (mLanguageIndex != -1 && mDictionary.TryGetValue(mobKey, out vals))
  5.                 {
  6.                         if (mLanguageIndex < vals.Length)
  7.                                 return vals[mLanguageIndex];
  8.                 }
  9.                 else if (mOldDictionary.TryGetValue(mobKey, out val)) return val;
  10. #endif
Title: Re: 3.5.0 compilation errors
Post by: ArenMook on February 17, 2014, 11:09:51 AM
You're right, thanks. Replace function missed it as it's inside an #ifdef.