Handle build error

parent 2cceb4f7
......@@ -151,7 +151,11 @@ static class BuildCommand
var buildOptions = GetBuildOptions();
var fixedBuildPath = GetFixedBuildPath(buildTarget, buildPath, buildName, buildOptions);
BuildPipeline.BuildPlayer(GetEnabledScenes(), fixedBuildPath, buildTarget, buildOptions);
var buildReport = BuildPipeline.BuildPlayer(GetEnabledScenes(), fixedBuildPath, buildTarget, buildOptions);
if (buildReport.summary.result != UnityEditor.Build.Reporting.BuildResult.Succeeded)
throw new Exception($"Build end with {buildReport.summary.result} status");
Console.WriteLine(":: Done with build");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment