protected void CreateNewAssetBundle(object context) { BundleDataInfo info = null; var selectedNodes = context as List <BundleTreeItem>; if (selectedNodes != null && selectedNodes.Count > 0) { info = selectedNodes[0].BundleData as BundleDataInfo; } var newBundle = BundleModel.CreateEmptyBundle(info); ReloadAndSelect(newBundle.nameHashCode, true); }
private void DragPathsToNewSpace(string[] paths, BundleDataInfo root, bool hasScene) { if (hasScene) { var hashCodes = new List <int>(); foreach (var assetPath in paths) { var newBundle = BundleModel.CreateEmptyBundle(root, System.IO.Path.GetFileNameWithoutExtension(assetPath).ToLower()); BundleModel.MoveAssetToBundle(assetPath, newBundle.m_Name); hashCodes.Add(newBundle.nameHashCode); } ReloadAndSelect(hashCodes); } else { var newBundle = BundleModel.CreateEmptyBundle(root); BundleModel.MoveAssetToBundle(paths, newBundle.m_Name); ReloadAndSelect(newBundle.nameHashCode, true); } }
public static BundleDataInfo CreateEmptyBundle(BundleDataInfo info = null, string newName = null) { var name = newName; return(CreateEmptyBundle(GetUniqueName(name))); }
public BundleTreeItem(BundleDataInfo dataInfo, int depth, Texture2D iconTexture) : base(dataInfo.nameHashCode, depth, dataInfo.m_Name) { m_BundleData = dataInfo; icon = iconTexture; children = new List <TreeViewItem>(); }
public static void HandleBundleMerge(List <BundleDataInfo> draggedNodes, BundleDataInfo targetDataBundle) { }