protected override TreeViewItem BuildRoot() { var root = new AssetBundleState.AssetInfo.TreeItem(); root.children = new List <TreeViewItem>(); if (m_selecteditems != null) { int index = 0; foreach (var a in m_selecteditems) { var item = new AssetBundleState.AssetInfo.TreeItem(a, 0, a.m_name); root.AddChild(item); var refs = new List <AssetBundleState.AssetInfo>(); a.GatherReferences(refs); if (refs.Count > 0) { var refItem = new TreeViewItem(index++, 1, refs.Count + " reference" + (refs.Count == 1 ? "" : "s")); refItem.icon = Utilities.FoldlerIcon; item.AddChild(refItem); foreach (var d in refs) { refItem.AddChild(new AssetBundleState.AssetInfo.TreeItem(d, 2, d.m_name)); } } var bundles = new List <AssetBundleState.BundleInfo>(); a.GatherBundles(bundles); if (bundles.Count > 0) { var refItem = new TreeViewItem(index++, 1, bundles.Count + " bundle" + (bundles.Count == 1 ? "" : "s")); refItem.icon = Utilities.FoldlerIcon; item.AddChild(refItem); foreach (var d in bundles) { refItem.AddChild(new AssetBundleState.BundleInfo.TreeItem(d, 2)); } } } } return(root); }
protected override TreeViewItem BuildRoot() { var root = new AssetBundleState.AssetInfo.TreeItem(); root.children = new List <TreeViewItem>(); if (m_data != null) { foreach (var a in m_data.m_assets) { root.AddChild(new AssetBundleState.AssetInfo.TreeItem(a, 0, Color.white)); } foreach (var a in m_data.m_extendedAssets) { root.AddChild(new AssetBundleState.AssetInfo.TreeItem(a, 0, greyColor)); } } return(root); }