示例#1
0
        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);
        }
示例#2
0
 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);
     }
 }
示例#3
0
        public static BundleDataInfo CreateEmptyBundle(BundleDataInfo info = null, string newName = null)
        {
            var name = newName;

            return(CreateEmptyBundle(GetUniqueName(name)));
        }
示例#4
0
 public BundleTreeItem(BundleDataInfo dataInfo, int depth, Texture2D iconTexture) : base(dataInfo.nameHashCode, depth, dataInfo.m_Name)
 {
     m_BundleData = dataInfo;
     icon         = iconTexture;
     children     = new List <TreeViewItem>();
 }
示例#5
0
 public static void HandleBundleMerge(List <BundleDataInfo> draggedNodes, BundleDataInfo targetDataBundle)
 {
 }