Esempio n. 1
0
        public static void Refresh()
        {
            m_emptyMessageString = kProblemEmptyMessage;
            if (m_inErrorState)
            {
                return;
            }

            var bundleList = ValidateBundleList();

            if (bundleList != null)
            {
                m_emptyMessageString = kDefaultEmptyMessage;
                foreach (var bundleName in bundleList)
                {
                    AddBundleToModel(bundleName);
                }
                AddBundlesToUpdate(m_rootLevelBundles.GetChildList());
            }

            if (m_inErrorState)
            {
                m_rootLevelBundles   = new BundleFolderConcreteInfo("", null);
                m_emptyMessageString = kProblemEmptyMessage;
            }
        }
Esempio n. 2
0
        private static BundleFolderConcreteInfo AddFoldersToBundle(BundleFolderInfo root, BundleNameData nameData)
        {
            BundleInfo currInfo = root;
            var        folder   = currInfo as BundleFolderConcreteInfo;
            var        size     = nameData.PathTokens.Count;

            for (var index = 0; index < size; index++)
            {
                if (folder != null)
                {
                    currInfo = folder.GetChild(nameData.PathTokens[index]);
                    if (currInfo == null)
                    {
                        currInfo = new BundleFolderConcreteInfo(nameData.PathTokens, index + 1, folder);
                        folder.AddChild(currInfo);
                    }

                    folder = currInfo as BundleFolderConcreteInfo;
                    if (folder == null)
                    {
                        m_inErrorState = true;
                        LogError("Bundle " + currInfo.m_name.FullNativeName + " has a name conflict with a bundle-folder.  Display of bundle data and building of bundles will not work.");
                        break;
                    }
                }
            }
            return(currInfo as BundleFolderConcreteInfo);
        }
Esempio n. 3
0
 public static void Rebuild()
 {
     m_rootLevelBundles = new BundleFolderConcreteInfo("", null);
     m_moveData         = new List <ABMoveData>();
     m_bundlesToUpdate  = new List <BundleInfo>();
     m_globalAssetList  = new Dictionary <string, AssetInfo>();
     Refresh();
 }
Esempio n. 4
0
        public static BundleFolderInfo CreateEmptyBundleFolder(BundleFolderConcreteInfo folder = null)
        {
            folder = (folder == null) ? m_rootLevelBundles : folder;
            string         name     = GetUniqueName(folder) + "/dummy";
            BundleNameData nameData = new BundleNameData(folder.m_name.BundleName, name);

            return(AddFoldersToBundle(m_rootLevelBundles, nameData));
        }