Beispiel #1
0
        private void doBundleSaveOne(string bundleName, int type)
        {
            ResourceSaveExData data = _newVersion.getBundleEx(bundleName);

            if (data != null)
            {
                if (ShineToolSetting.bundlePackNeedPutDependAlsoIntoStreamingAssets && type == ResourceSaveType.InStreamingAsset && data.saveType != type)
                {
                    data.saveType = type;
                }
            }
            else
            {
                data = doFileSaveData(getTargetSourcePath(), bundleName, type);

                if (ShineToolSetting.bundlePackNeedPutDependAlsoIntoStreamingAssets)
                {
                    int resourceID = LoadControl.getResourceIDByName(data.name);

                    BundleInfoData bundleInfoData = LoadControl.getBundleInfo(resourceID);

                    foreach (int d in bundleInfoData.depends)
                    {
                        string pName = LoadControl.getResourceNameByID(d);

                        //父类型
                        doBundleSaveOne(pName, type);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 获取组件信息
        /// </summary>
        /// <param name="metadata">数据元素</param>
        /// <returns>BundleInfoData</returns>
        private static BundleInfoData GetBundleInfoData(AddinMetadata metadata)
        {
            BundleInfoData bundle = new BundleInfoData();

            bundle.AssemblyVersion = metadata.AssemblyVersion;
            bundle.Company         = metadata.Company;
            bundle.Copyright       = metadata.Copyright;
            bundle.ContactAddress  = metadata.Path;
            bundle.Description     = metadata.Description;
            bundle.Title           = metadata.Title;
            return(bundle);
        }
Beispiel #3
0
        private void RecordPath(string assetPath, string bundleName)
        {
            if (string.IsNullOrEmpty(assetPath) == true ||
                string.IsNullOrEmpty(bundleName) == true)
            {
                UnityEngine.Debug.Break();
            }

            if (pathBundle.ContainsKey(assetPath) == true)
            {
                pathBundle[assetPath].count++;
            }
            else
            {
                BundleInfoData data = new BundleInfoData();
                data.count     = 1;
                data.firstName = bundleName;
                pathBundle.Add(assetPath, data);
            }
        }
Beispiel #4
0
        /** 创建一个bundle数据信息 */
        private void createBundleData(string bundleName)
        {
            int id = getResourceId();

            checkBundleRepeat(bundleName);
            _bundleInfoDataList[bundleName] = new BundleInfoData {
                id = id
            };
            _bundleInfoExDataList[bundleName] = new BundleInfoExData {
                id = id, name = bundleName
            };
            _resourceInfoDataList[id] = new ResourceInfoData {
                id = id, name = "bundle/" + bundleName, type = ResourceType.Bundle
            };
            ResourceInfoExData resourceInfoExData = new ResourceInfoExData {
                id = id, name = bundleName
            };

            _resourceInfoExDataList[id] = resourceInfoExData;
            _resourceInfoExDataCache[resourceInfoExData.name] = resourceInfoExData;
        }