File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Assets/MixedRealityToolkit/Utilities/BuildAndDeploy Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 33
44using Microsoft . MixedReality . Toolkit . Utilities . Editor ;
55using System ;
6+ using System . Collections . Generic ;
67using System . Diagnostics ;
78using System . IO ;
89using System . Linq ;
@@ -216,8 +217,19 @@ public static void ParseBuildCommandLine(ref IBuildInfo buildInfo)
216217 case "-autoIncrement" :
217218 buildInfo . AutoIncrement = true ;
218219 break ;
219- case "-scenes" :
220- // TODO parse json scene list and set them.
220+ case "-sceneList" :
221+ buildInfo . Scenes = buildInfo . Scenes . Union ( SplitSceneList ( arguments [ ++ i ] ) ) ;
222+ break ;
223+ case "-sceneListFile" :
224+ string path = arguments [ ++ i ] ;
225+ if ( File . Exists ( path ) )
226+ {
227+ buildInfo . Scenes = buildInfo . Scenes . Union ( SplitSceneList ( File . ReadAllText ( path ) ) ) ;
228+ }
229+ else
230+ {
231+ Debug . LogWarning ( $ "Scene list file at '{ path } ' does not exist.") ;
232+ }
221233 break ;
222234 case "-buildOutput" :
223235 buildInfo . OutputDirectory = arguments [ ++ i ] ;
@@ -242,6 +254,12 @@ public static void ParseBuildCommandLine(ref IBuildInfo buildInfo)
242254 }
243255 }
244256
257+ private static IEnumerable < string > SplitSceneList ( string sceneList )
258+ {
259+ return from scene in sceneList . Split ( new char [ ] { ',' } , StringSplitOptions . RemoveEmptyEntries )
260+ select scene . Trim ( ) ;
261+ }
262+
245263 /// <summary>
246264 /// Restores any nuget packages at the path specified.
247265 /// </summary>
You can’t perform that action at this time.
0 commit comments