Ejemplo n.º 1
0
        public override int PrepareToLoad()
        {
            _globalBundlesPath = PYBundleFolderScanner.GetGlobalLocalizationBundlesPath(PYBundleManager.Instance.Language);
            _localBundlesPath  = PYBundleFolderScanner.GetExpansionLocalizedBundlesPath(PYBundleManager.Instance.ExpansionName,
                                                                                        PYBundleType.Localization, PYBundleManager.Instance.Language);

            return(_globalBundlesPath.Count + _localBundlesPath.Count);
        }
Ejemplo n.º 2
0
                         private void ReadArguments()
                         {
                             bool hasFoundLanguage = false;

                             Language = "pt-BR";
                             string[] paramsExe = System.Environment.GetCommandLineArgs();
#if UNITY_EDITOR
                             paramsExe = new string[1] {
                                 "lang:" + Language
                             };
#endif
                             for (int i = 0; i < paramsExe.Length; i++)
                             {
                                 // Check if exists some bundle for the language passed in exe param
                                 if (paramsExe[i].StartsWith("lang:"))
                                 {
                                     string language = paramsExe[i].Replace("lang:", "");
                                     foreach (string pathLocalization in PYBundleFolderScanner.GetGlobalLocalizationBundlesPath(language))
                                     {
                                         if (pathLocalization.Contains(".unity3d"))
                                         {
                                             Language         = language;
                                             hasFoundLanguage = true;
                                         }
                                     }
                                 }
                                 // Check if exists some bundle for the expansion passed in exe param
                                 else if (paramsExe[i].StartsWith("expan:"))
                                 {
                                     string expansionName = paramsExe[i].Replace("expan:", "");
                                     foreach (string pathLocalization in PYBundleFolderScanner.GetExpansionBundlesPath(expansionName, PYBundleType.Localization))
                                     {
                                         if (pathLocalization.Contains(".unity3d"))
                                         {
                                             ExpansionName = expansionName;
                                         }
                                     }
                                 }
                             }

                             if (!hasFoundLanguage)
                             {
                                 Language = "pt-BR";
                             }
                         }