void CreateItems(IList <TreeViewItem> rows, AssetBundleDataCache.AssetData a, int depth) { Item item = new Item(a, depth); rows.Add(item); var dependencies = AssetDatabase.GetDependencies(a.m_assetPath, false); if (IsExpanded(a.m_id)) { foreach (var d in dependencies) { if (d != a.m_assetPath) { AssetBundleDataCache.AssetData ad = AssetBundleDataCache.GetAssetData(string.Empty, d); if (string.IsNullOrEmpty(ad.m_bundle)) { CreateItems(rows, ad, depth + 1); } } } } else { if (dependencies.Length > 0 && dependencies[0] != a.m_assetPath) { item.children = CreateChildListForCollapsedParent(); } } }
public AssetBundleTree(TreeViewState state, AssetListTree alt) : base(state) { m_assetList = alt; AssetBundleDataCache.InitializeBundleData(AssetDatabase.GetAllAssetBundleNames()); Reload(); }