protected override DragAndDropVisualMode HandleDragAndDrop(DragAndDropArgs args)
        {
            if (IsValidDragDrop())
            {
                if (args.performDrop)
                {
                    Model.AssetBundleModel.MoveAssetToBundle(DragAndDrop.paths, m_BundleInfos[0].m_Name.bundleName, m_BundleInfos[0].m_Name.variant);
                    Model.AssetBundleModel.ExecuteAssetMove();
                    foreach (var bundle in m_BundleInfos)
                    {
                        bundle.RefreshAssetList();
                    }
                    m_Controller.UpdateSelectedBundles(m_BundleInfos);
                }
                return(DragAndDropVisualMode.Copy);//Move;
            }

            return(DragAndDropVisualMode.Rejected);
        }
Exemplo n.º 2
0
        protected override void SelectionChanged(IList <int> selectedIds)
        {
            var selectedBundles = new List <Model.AssetBundleInfo>();

            if (selectedIds != null)
            {
                foreach (var id in selectedIds)
                {
                    if (FindItem(id, rootItem) is Model.BundleTreeViewItem item && item.assetBundleInfo != null)
                    {
                        item.assetBundleInfo.RefreshAssetList();
                        selectedBundles.Add(item.assetBundleInfo);
                    }
                }
            }

            m_Controller.UpdateSelectedBundles(selectedBundles);
        }