示例#1
0
        public override int PrepareToLoad()
        {
            _globalBundlesPath = PYBundleFolderScanner.GetGlobalBundlesPath(PYBundleType.Data);
            _localBundlesPath  = PYBundleFolderScanner.GetExpansionBundlesPath(PYBundleManager.Instance.ExpansionName, PYBundleType.Data);

            return(_globalBundlesPath.Count + _localBundlesPath.Count);
        }
示例#2
0
        public override int PrepareToLoad()
        {
            _globalBundlesPath = PYBundleFolderScanner.GetGlobalLocalizedBundlesPath(PYBundleType.Content, PYBundleManager.Instance.Language);
            if (_globalBundlesPath.Count == 0)
            {
                _globalBundlesPath = PYBundleFolderScanner.GetGlobalBundlesPath(PYBundleType.Content);
            }

            _localBundlesPath = PYBundleFolderScanner.GetExpansionLocalizedBundlesPath(PYBundleManager.Instance.ExpansionName,
                                                                                       PYBundleType.Content, PYBundleManager.Instance.Language);
            if (_localBundlesPath.Count == 0)
            {
                _localBundlesPath = PYBundleFolderScanner.GetExpansionBundlesPath(PYBundleManager.Instance.ExpansionName, PYBundleType.Content);
            }

            return(_globalBundlesPath.Count + _localBundlesPath.Count);
        }
示例#3
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";
                             }
                         }