예제 #1
0
        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);
        }
예제 #2
0
            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;
                        }
                    }
                }
            }
예제 #3
0
        public static bool HandleBundleRename(BundleTreeItem item, string newName)
        {
            bool result = item.BundleData.HandleRename(newName);

            return(result);
        }