File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,18 @@ private static IEnumerator ExecuteBuild()
122122 FullSerializer . AotHelpers . CleanAOT ( ) ;
123123 IsBuilding = false ;
124124
125+ // if BuildPlayer returned no error, but we can't find the file, flag this build as a failure then..
126+ if ( string . IsNullOrEmpty ( BuildError ) && ! File . Exists ( buildPath ) && ! Directory . Exists ( buildPath ) )
127+ BuildError = "Failed to build player: " + buildPath ;
128+
129+ // check the command line arguments, if we find -executeMethod Build.* then quit this editor..
130+ string [ ] args = Environment . GetCommandLineArgs ( ) ;
131+ for ( int i = 0 ; i < args . Length ; ++ i )
132+ {
133+ if ( args [ i ] == "-executemethod" && ( i + 1 ) < args . Length && args [ i + 1 ] . StartsWith ( "Build." ) )
134+ EditorApplication . Exit ( string . IsNullOrEmpty ( BuildError ) ? 0 : 1 ) ;
135+ }
136+
125137 // TODO: Check if launch from the command line, if so then quit out..
126138 yield break ;
127139 }
You can’t perform that action at this time.
0 commit comments