Last active
August 11, 2019 13:21
-
-
Save rkandas/f5a71b13759edbd9b76f04f0cfb15e53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void PerformBuild () | |
{ | |
Console.WriteLine (":: Performing build"); | |
var buildTarget = GetBuildTarget (); | |
var buildPath = GetBuildPath (); | |
var buildName = GetBuildName (); | |
var fixedBuildPath = GetFixedBuildPath (buildTarget, buildPath, buildName); | |
Console.WriteLine("Fixed build path:" + fixedBuildPath); | |
var buildInfo = BuildPipeline.BuildPlayer (GetEnabledScenes (), fixedBuildPath, buildTarget, GetBuildOptions ()); | |
if( buildInfo.summary.result == BuildResult.Succeeded ) { | |
Console.WriteLine (":: Done with build"); | |
} | |
else { | |
Console.WriteLine (":: Build error"); | |
foreach (var step in buildInfo.steps) { | |
foreach (var message in step.messages) { | |
Console.WriteLine (step.name + " -- " + message.content); | |
} | |
} | |
EditorApplication.Exit( 1 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment