//通过选择资源列表生成TreeView的根节点
        private AssetViewItem SelectedAssetGuidToRootItem(List <string> selectedAssetGuid)
        {
            updatedAssetSet.Clear();
            int elementCount = 0;
            var root         = new AssetViewItem {
                id = elementCount, depth = -1, displayName = "Root", data = null
            };
            int depth = 0;

            foreach (var childGuid in selectedAssetGuid)
            {
                root.AddChild(CreateTree(childGuid, ref elementCount, depth));
            }
            updatedAssetSet.Clear();
            return(root);
        }
        //通过每个节点的数据生成子节点
        private AssetViewItem CreateTree(string guid, ref int elementCount, int _depth)
        {
            if (needUpdateState && !updatedAssetSet.Contains(guid))
            {
                data.UpdateAssetState(guid);
                updatedAssetSet.Add(guid);
            }
            ++elementCount;
            var referenceData = data.assetDict[guid];
            var root          = new AssetViewItem {
                id = elementCount, displayName = referenceData.name, data = referenceData, depth = _depth
            };
            var childGuids = isDepend ? referenceData.dependencies : referenceData.references;

            foreach (var childGuid in childGuids)
            {
                root.AddChild(CreateTree(childGuid, ref elementCount, _depth + 1));
            }
            return(root);
        }