Пример #1
0
    public void GenerateAssetBundleNames()
    {
        List <BuildBundleInfo> tempList = buildBundleLib.GetBundleInfoList();

        for (int i = 0; i < tempList.Count; i++)
        {
            BuildBundleInfo tempInfo = tempList[i];
            if (tempInfo != null)
            {
                DoSetFolderAssetBundleName(tempInfo.Prefix, tempInfo.Path, tempInfo.SuffixArray);
            }
        }
    }
Пример #2
0
    public void RemoveAssetBundleNames()
    {
        List <BuildBundleInfo> tempList = buildBundleLib.GetBundleInfoList();

        for (int i = 0; i < tempList.Count; i++)
        {
            BuildBundleInfo tempInfo = tempList[i];
            if (tempInfo != null)
            {
                RemoveUnusedAssetBundleNames(tempInfo.Prefix, tempInfo.Path, tempInfo.SuffixArray);
            }
        }
    }
Пример #3
0
    void BuildAssetBundleFolder(string _folderPath, BuildTarget _target)
    {
        List <BuildBundleInfo> tempList = buildBundleFolderLib.GetBundleInfoList();

        AssetBundleBuild[] tempAssetBundleArray = new AssetBundleBuild[tempList.Count];
        for (int i = 0; i < tempAssetBundleArray.Length; i++)
        {
            BuildBundleInfo tempInfo = tempList[i];
            tempAssetBundleArray[i].assetBundleName = tempInfo.Prefix + tempInfo.Path + BuildConst.ExtName;
            List <FileParamInfo> tempInfoList   = UtilityFile.GetDirectoryAllAssetsFile(_folderPath + tempInfo.Path, tempInfo.SuffixArray);
            string[]             tempAssetNames = new string[tempInfoList.Count];
            for (int j = 0; j < tempAssetNames.Length; j++)
            {
                tempAssetNames[j] = tempInfoList[j].FilePath;
            }

            tempAssetBundleArray[i].assetNames = tempAssetNames;
        }

        UtilityFile.CreateDirectory(BuildConst.BuildFolderAssetPath);
        BuildPipeline.BuildAssetBundles(BuildConst.BuildFolderAssetPath, tempAssetBundleArray, BuildAssetBundleOptions.ChunkBasedCompression, _target);
    }