public static BundleTreeItem CreateAssetBundleTreeView() { var root = new BundleTreeItem(m_RootLevelDataInfo, -1, null); foreach (var itr in m_BundleList) { var child = new BundleTreeItem(itr, 0, null); root.AddChild(child); } return(root); }
public DragAndDropData(DragAndDropArgs a) { args = a; draggedNodes = DragAndDrop.GetGenericData("AssetBundles.BundleDataInfo") as List <BundleDataInfo>; targetNode = args.parentItem as BundleTreeItem; paths = DragAndDrop.paths; if (draggedNodes != null) { foreach (var bundle in draggedNodes) { var dataBundle = bundle as BundleDataInfo; if (dataBundle != null) { if (dataBundle.isSceneBundle) { hasScene = true; } else { hasNonScene = true; } } } } else if (DragAndDrop.paths != null) { foreach (var assetPath in DragAndDrop.paths) { if (AssetDatabase.GetMainAssetTypeAtPath(assetPath) == typeof(SceneAsset)) { hasScene = true; } else { hasNonScene = true; } } } }
public static bool HandleBundleRename(BundleTreeItem item, string newName) { bool result = item.BundleData.HandleRename(newName); return(result); }