Esempio n. 1
0
        public static void Run()
        {
            BuildLogger.LogHeader("Starting Build Script");

            BuildReport buildReport = null;
            var         buildTarget = BuildUtils.GetBuildTarget();

            switch (buildTarget)
            {
            case BuildTarget.NoTarget:
                EditorApplication.Exit(-1);
                break;

            case BuildTarget.WebGL:
                buildReport = WebGlBuildStrategy.RunBuild();
                break;

            case BuildTarget.Android:
                buildReport = AndroidBuildStrategy.RunBuild();
                break;

            default:
                throw new ArgumentException($"BuildTarget {buildTarget} is not supported");
            }

            ProcessBuildReport(buildReport);
        }
Esempio n. 2
0
        private static void ProcessBuildReport(BuildReport buildReport)
        {
            BuildLogger.LogHeader("BUILD COMPLETED!");

            var exitCode = buildReport.summary.result;

            BuildLogger.LogHeader($"BuildReport Result: {exitCode.ToString()}");
        }
        public static BuildReport RunBuild()
        {
            BuildLogger.LogHeader("Starting BuildPipeline for WEBGL");

            var buildOptions = GetBuildPlayerOptions();

            BuildLogger.LogSeparator("Running BuildPlayer");

            return(BuildPipeline.BuildPlayer(buildOptions));
        }