Ejemplo n.º 1
0
 private void RefreshList(List <string> list)
 {
     for (int i = 0; i < list.Count; ++i)
     {
         string path = PathConfig.FormatAssetPath(list[i]);
         string name = System.IO.Path.GetFileName(path);
         EditorUtility.DisplayProgressBar("获取AssetPath数据", name, (i * 1.0f) / list.Count);
         if (PathConfig.IsMeta(path))
         {
             continue;
         }
         AssetPathInfo pathInfo = AssetPathInfo.CreatePathInfo(path);
         m_pathInfoList.Add(pathInfo);
     }
     EditorUtility.ClearProgressBar();
     RefreshDataWithSelect();
 }
Ejemplo n.º 2
0
        public void OnBundleSelected(object selected, int col)
        {
            BundleData bundleData = selected as BundleData;

            if (bundleData == null)
            {
                return;
            }

            if (m_assetTable != null)
            {
                List <object> list = new List <object>();
                for (int i = 0; i < bundleData.includs.Count; ++i)
                {
                    AssetPathInfo pathInfo = AssetPathInfo.CreatePathInfo(bundleData.includs[i]);
                    if (pathInfo != null)
                    {
                        list.Add(pathInfo);
                    }
                }
                m_assetTable.RefreshData(list);
            }
        }
Ejemplo n.º 3
0
        public BundleImportData GetPathSelectData(string path)
        {
            path = PathConfig.FormatAssetPath(path);
            path = PathConfig.NormalizePathSplash(path);
            AssetPathInfo pathInfo = AssetPathInfo.CreatePathInfo(path);

            if (pathInfo == null)
            {
                return(null);
            }

            if (pathInfo.Index >= 0 && pathInfo.Index < m_dataList.Count)
            {
                return(m_dataList[pathInfo.Index]);
            }
            for (int i = m_dataList.Count - 1; i >= 0; --i)
            {
                if (m_dataList[i].IsMatch(path))
                {
                    return(m_dataList[i]);
                }
            }
            return(null);
        }