public override void Run(BuildJob job, BuildJobParameters parameters)
        {
            string targetFolder = Path.Combine(parameters.destination, this.subfolder);

            if (!Directory.Exists(targetFolder))
            {
                Directory.CreateDirectory(targetFolder);
            }

            // Build build option
            BuildOptions buildOptions = BuildOptions.None;

            if (this.developmentBuild)
            {
                buildOptions |= BuildOptions.Development;
            }
            if (this.scriptDebugging)
            {
                buildOptions |= BuildOptions.AllowDebugging;
            }

            BuildPipeline.BuildPlayer(new BuildPlayerOptions()
            {
                assetBundleManifestPath = Path.Combine(parameters.destination, this.assetBundleManifestPath),
                options          = buildOptions,
                locationPathName = Path.Combine(targetFolder, this.playerName),
                scenes           = this.overrideScenes ? this.overrideScenePaths : EditorBuildSettings.scenes.Where((s) => s.enabled).Select((s) => s.path).ToArray(),
                target           = this.buildTarget,
                targetGroup      = this.buildTargetGroup
            });
        }
Example #2
0
        public override void Run(BuildJob job, BuildJobParameters parameters)
        {
            string dst;

            if (!string.IsNullOrWhiteSpace(subJob.destination))
            {
                dst = Path.Combine(parameters.destination, subJob.destination);
            }
            else
            {
                dst = parameters.destination;
            }

            subJob.Run(new BuildJobParameters(dst, parameters.deleteExistingDestination));
        }
Example #3
0
        public override void Run(BuildJob job, BuildJobParameters parameters)
        {
            List <string> subfolders = new List <string>(this.subfolders);

            if (subfolders.Count == 1)
            {
                subfolders[0] += "/*";
            }

            if (File.Exists(backend7ZipExePath))
            {
                // Use 7zip backend
                string arguments = "a " + Path.Combine(parameters.destination, archiveDestination) + " " + string.Join(" ", subfolders.Select(s => "\"" + Path.Combine(parameters.destination, s) + "\""));
                Process.Start(backend7ZipExePath, arguments).WaitForExit();
            }
        }
Example #4
0
        /// <summary>
        /// Executes all tasks
        /// </summary>
        public void Run(BuildJobParameters parameters)
        {
            if (parameters.deleteExistingDestination && Directory.Exists(parameters.destination))
            {
                Directory.Delete(parameters.destination, true);
            }

            if (!Directory.Exists(parameters.destination))
            {
                Directory.CreateDirectory(parameters.destination);
            }

            for (int i = 0; i < this.tasks.Length; i++)
            {
                this.tasks[i].Run(this, parameters);
            }
        }
        public override void Run(BuildJob job, BuildJobParameters parameters)
        {
            BuildAssetBundleOptions options = BuildAssetBundleOptions.None;

            for (int i = 0; i < this.bundleOptions.Length; i++)
            {
                options |= this.bundleOptions[i];
            }

            // Create directory if not existing
            string path = Path.Combine(parameters.destination, this.subfolder);

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }

            BuildPipeline.BuildAssetBundles(path, options, this.buildTarget);
        }
Example #6
0
 public abstract void Run(BuildJob job, BuildJobParameters parameters);