Exemplo n.º 1
0
        /// <summary>
        /// 在导出之前执行
        /// </summary>
        public void BeforeExport()
        {
            if (beforeExportProcess)
            {
                return;
            }
            beforeExportProcess = true;

            foreach (AssetTarget item in _dependChildrenSet)
            {
                item.BeforeExport();
            }

            if (this.exportType == AssetBundleExportType.Asset)
            {
                HashSet <AssetTarget> rootSet = new HashSet <AssetTarget>();
                this.GetRoot(rootSet);
                if (rootSet.Count > 1)
                {
                    HashSet <string> set = new HashSet <string>();
                    foreach (var r in rootSet)
                    {
                        set.Add(r.bundleName);
                    }

                    if (set.Count > 1)
                    {
                        this.exportType = AssetBundleExportType.Standalone;
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 在导出之前执行
        /// </summary>
        public void BeforeExport()
        {
            if (beforeExportProcess)
            {
                return;
            }
            beforeExportProcess = true;

            foreach (AssetTarget item in _dependChildrenSet)
            {
                item.BeforeExport();
            }
            //load assetbundle no problem   unload      asset
            //prefab 是根    引用一系列asset    若还被其他的根或者standalone引用 则设置为standalone
            //说白了 就是  一个prefab一个包   若一个asset被两个包(包括单独包)以上引用  则asset也单独一个包
            if (this.exportType == AssetBundleExportType.Asset)
            {
                HashSet <AssetTarget> rootSet = new HashSet <AssetTarget>();
                this.GetRoot(rootSet);
                if (rootSet.Count > 1)
                {
                    this.exportType = AssetBundleExportType.Standalone;
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 在导出之前执行 计算被多个素材依赖
        /// </summary>
        public void BeforeExport()
        {
            if (beforeExportProcess)
            {
                return;
            }
            beforeExportProcess = true;

            foreach (AssetTarget item in _dependsChildren)
            {
                item.BeforeExport();
            }
            if (exportType == AssetBundleExportType.Asset)
            {
                HashSet <AssetTarget> rootSet = new HashSet <AssetTarget>();
                GetRoot(rootSet);
                if (rootSet.Count > 1)
                {
                    exportType = AssetBundleExportType.Standalone;
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 在导出之前执行
        /// </summary>
        public void BeforeExport()
        {
            if (_beforeExportProcess)
            {
                return;
            }
            _beforeExportProcess = true;

            //从最上层开始
            foreach (var dependParent in _dependParentSet)
            {
                dependParent.BeforeExport();
            }


            HashSet <AssetBuildInfo> rootSet = new HashSet <AssetBuildInfo>();

            this.GetRoot(rootSet);                                  //获取与本节点有关联的根节点们,即最终需要被输出的节点
            if (rootSet.Count > 1)                                  //大于1个
            {
                this.exportType = AssetBundleExportType.Standalone; //设置为Standalone,输出该节点
            }
        }