protected override void SelectionChanged(IList <int> selectedIds)
        {
            _SelectedBundles.Clear();
            if (selectedIds != null)
            {
                var tempSelectCount = selectedIds.Count();
                if (_SelectedBundles.Capacity < tempSelectCount)
                {
                    _SelectedBundles.Capacity = tempSelectCount;
                }

                var tempRootItem = rootItem;
                foreach (var id in selectedIds)
                {
                    var item = FindItem(id, tempRootItem) as AssetBundleModel.BundleTreeItem;
                    if (item == null || item.bundle == null)
                    {
                        continue;
                    }

                    //item.bundle.RefreshAssetList();
                    _SelectedBundles.Add(item.bundle);
                }
            }

            m_Controller.UpdateSelectedBundles(_SelectedBundles);
        }
Exemplo n.º 2
0
        protected override DragAndDropVisualMode HandleDragAndDrop(DragAndDropArgs args)
        {
            if (IsValidDragDrop())
            {
                if (args.performDrop)
                {
                    AssetBundleModel.Model.MoveAssetToBundle(DragAndDrop.paths, m_SourceBundles[0].Name.BundleName, m_SourceBundles[0].Name.Variant);
                    AssetBundleModel.Model.ExecuteAssetMove();
                    foreach (var bundle in m_SourceBundles)
                    {
                        bundle.RefreshAssetList();
                    }
                    m_Controller.UpdateSelectedBundles(m_SourceBundles);
                }
                return(DragAndDropVisualMode.Copy);//Move;
            }

            return(DragAndDropVisualMode.Rejected);
        }
Exemplo n.º 3
0
        public void ShowAssetBundle(string assetbundle)
        {
            m_Mode = Mode.Browser;
            var selectedBundles = new List <AssetBundleModel.BundleInfo>();
            var bi = AssetBundleModel.Model.FindBundle(new AssetBundleModel.BundleNameData(assetbundle));

            selectedBundles.Add(bi);
            m_ManageTab.ForceReloadData();
            m_ManageTab.UpdateSelectedBundles(selectedBundles);
        }
Exemplo n.º 4
0
        protected override void SelectionChanged(IList <int> selectedIds)
        {
            var selectedBundles = new List <AssetBundleModel.BundleInfo>();

            if (selectedIds != null)
            {
                foreach (var id in selectedIds)
                {
                    var item = FindItem(id, rootItem) as AssetBundleModel.BundleTreeItem;
                    if (item != null && item.Bundle != null)
                    {
                        item.Bundle.RefreshAssetList();
                        selectedBundles.Add(item.Bundle);
                    }
                }
            }

            m_Controller.UpdateSelectedBundles(selectedBundles);
        }