示例#1
0
        /// <summary>
        /// Build AssetBunle
        /// </summary>
        /// <param name="buildTargetGroup"></param>
        private static void BuildAssetBundle(BuildTargetGroup buildTargetGroup)
        {
            var isHotUpdateBuild = ContainsEnvOption(EnvOption.HOT_UPDATE_BUILD);

            var beginTime = System.DateTime.Now;

            if (!isHotUpdateBuild || (isHotUpdateBuild && ContainsEnvOption(EnvOption.ANALYZE_BUNDLE)))
            {
                AssetBundleAnalyzer.AutoAnalyzeAssetBundleName();
            }
            Debug.Log("=================Build AutoAnalyzeAssetBundleName Time================ : " + (System.DateTime.Now - beginTime).TotalSeconds);

            beginTime = System.DateTime.Now;
            ColaEditHelper.BuildManifest();
            ColaEditHelper.BuildAssetBundles();

            if (!isHotUpdateBuild)
            {
                ColaEditHelper.CopyAssetBundlesTo(Path.Combine(Application.streamingAssetsPath, Utility.AssetBundles));
                AssetDatabase.Refresh();

                BuildVideoFiles();
            }
            Debug.Log("=================Build BuildAssetBundle Time================ : " + (System.DateTime.Now - beginTime).TotalSeconds);
        }
示例#2
0
        /// <summary>
        /// Build AssetBunle
        /// </summary>
        /// <param name="buildTargetGroup"></param>
        private static void BuildAssetBundle(BuildTargetGroup buildTargetGroup)
        {
            var beginTime = System.DateTime.Now;

            AssetBundleAnalyzer.AutoAnalyzeAssetBundleName();
            Debug.Log("=================Build AutoAnalyzeAssetBundleName Time================ : " + (System.DateTime.Now - beginTime).TotalSeconds);

            beginTime = System.DateTime.Now;
            ColaEditHelper.BuildManifest();
            ColaEditHelper.BuildAssetBundles();

            ColaEditHelper.CopyAssetBundlesTo(Path.Combine(Application.streamingAssetsPath, Utility.AssetBundles));
            AssetDatabase.Refresh();
            Debug.Log("=================Build BuildAssetBundle Time================ : " + (System.DateTime.Now - beginTime).TotalSeconds);
        }