File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Assets/MixedRealityToolkit/Utilities/BuildAndDeploy Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -214,15 +214,13 @@ public static void ParseBuildCommandLine(ref IBuildInfo buildInfo)
214214 buildInfo . AutoIncrement = true ;
215215 break ;
216216 case "-sceneList" :
217- buildInfo . Scenes = buildInfo . Scenes . Union ( from scene in arguments [ ++ i ] . Split ( new char [ ] { ',' } , StringSplitOptions . RemoveEmptyEntries )
218- select scene . Trim ( ) ) ;
217+ buildInfo . Scenes = buildInfo . Scenes . Union ( SplitSceneList ( arguments [ ++ i ] ) ) ;
219218 break ;
220219 case "-sceneListFile" :
221220 string path = arguments [ ++ i ] ;
222221 if ( File . Exists ( path ) )
223222 {
224- buildInfo . Scenes = buildInfo . Scenes . Union ( from scene in File . ReadAllText ( path ) . Split ( new char [ ] { ',' } , StringSplitOptions . RemoveEmptyEntries )
225- select scene . TrimStart ( ) . TrimEnd ( ) ) ;
223+ buildInfo . Scenes = buildInfo . Scenes . Union ( SplitSceneList ( File . ReadAllText ( path ) ) ) ;
226224 }
227225 else
228226 {
@@ -249,6 +247,12 @@ public static void ParseBuildCommandLine(ref IBuildInfo buildInfo)
249247 }
250248 }
251249
250+ private static IEnumerable < string > SplitSceneList ( string sceneList )
251+ {
252+ return from scene in sceneList . Split ( new char [ ] { ',' } , StringSplitOptions . RemoveEmptyEntries )
253+ select scene . Trim ( ) ;
254+ }
255+
252256 /// <summary>
253257 /// Restores any nuget packages at the path specified.
254258 /// </summary>
You can’t perform that action at this time.
0 commit comments