private AssetBundleState.BundleInfo.TreeItem CreateFolder(AssetBundleState.BundleInfo.TreeItem p, string f)
        {
            if (f.Length == 0)
            {
                return(p);
            }

            string[] folders = f.Split('/');
            int      index   = 0;

            while (index < folders.Length)
            {
                bool found = false;
                if (p.hasChildren)
                {
                    foreach (var c in p.children)
                    {
                        if (c.displayName == folders[index])
                        {
                            p     = c as AssetBundleState.BundleInfo.TreeItem;
                            found = true;
                            break;
                        }
                    }
                }
                if (!found)
                {
                    var c = new AssetBundleState.BundleInfo.TreeItem((f + index).GetHashCode(), index, folders[index]);
                    p.AddChild(c);
                    p = c;
                }
                index++;
            }
            return(p);
        }
        protected override TreeViewItem BuildRoot()
        {
            var root = new AssetBundleState.BundleInfo.TreeItem();

            root.children = new List <TreeViewItem>();

            foreach (var b in AssetBundleState.m_bundles)
            {
                if (b.Key.Length == 0)
                {
                    continue;
                }
                var item = new AssetBundleState.BundleInfo.TreeItem(b.Value, 0);
                root.AddChild(item);
                if (b.Key == AssetBundleState.m_editBundleName)
                {
                    BeginRename(item, .25f);
                }
            }
            AssetBundleState.m_editBundleName = string.Empty;

            return(root);
        }