Beispiel #1
0
    public void Init()
    {
        Clear();

        string[] assetPaths = ResourceManageToolUtility.GetAllAssetPaths();
        foreach (var p in assetPaths)
        {
            if (IsPathContain(p))
            {
                U3DAssetInfo newInfo = new U3DAssetInfo();
                ResourceManageToolUtility.InitAssetInfo(p, ref newInfo);
                assetTable.Add(newInfo.guid, newInfo);
            }
        }
    }
    static void UpdateTreeView()
    {
        TreeViewCtrl treeView = s_root.FindControl("_MainTreeView") as TreeViewCtrl;

        if (treeView == null)
        {
            return;
        }

        treeView.Clear();

        string[] allAssetPaths = ResourceManageToolUtility.GetAllAssetPaths();

        foreach (var path in allAssetPaths)
        {
            if (ResourceManageToolUtility.PathIsFolder(path))
            {
                AddAssetToResourceTreeView(path);
            }
        }
    }
Beispiel #3
0
    public IEditorCoroutineTask NewRebuildTask()
    {
        U3DAssetDBRebuildTask task = null;

        if (rebuildTaskID.Equals(Guid.Empty))
        {
            string[] allPaths = ResourceManageToolUtility.GetAllAssetPaths();

            //确定要扫描的资源
            List <string> searchPaths = new List <string>();
            foreach (var p in allPaths)
            {
                if (IsPathContain(p))
                {
                    searchPaths.Add(p);
                }
            }

            task          = new U3DAssetDBRebuildTask(searchPaths.ToArray());
            rebuildTaskID = task.TaskID;
        }
        return(task);
    }