Пример #1
0
        public static string ResolvePath(string prototype)
        {
            StringBuilder sb = new StringBuilder(prototype);

            sb.Replace("$VERSION", BuildProject.SanitizeFolderName(BuildSettings.productParameters.lastGeneratedVersion));
            sb.Replace("$BUILD", BuildSettings.productParameters.buildCounter.ToString());

            return(sb.ToString());
        }
Пример #2
0
        private void Build(BuildPlatform platform, BuildArchitecture arch)
        {
            if (!platform.enabled || !arch.enabled)
            {
                return;
            }

            // Resolve build path.
            StringBuilder platformBundlePath = new StringBuilder(Path.Combine(baseBuildPath, innerBuildPath));

            platformBundlePath.Replace("$PLATFORM", BuildProject.SanitizeFolderName(platform.platformName));
            platformBundlePath.Replace("$ARCHITECTURE", BuildProject.SanitizeFolderName(arch.name));

            // Create build destination directory if it does not exist.
            if (!Directory.Exists(platformBundlePath.ToString()))
            {
                Directory.CreateDirectory(platformBundlePath.ToString());
            }

            // Build AssetBundles.
            BuildPipeline.BuildAssetBundles(platformBundlePath.ToString(), options, arch.target);
        }