@@ -12,7 +12,7 @@ public static class GetProjects
1212 static readonly string [ ] registryPathsToCheck = new string [ ] { @"SOFTWARE\Unity Technologies\Unity Editor 5.x" , @"SOFTWARE\Unity Technologies\Unity Editor 4.x" } ;
1313
1414 // convert target platform name into valid buildtarget platform name, NOTE this depends on unity version, now only 2019 and later are supported
15- static Dictionary < string , string > remapPlatformNames = new Dictionary < string , string > { { "StandaloneWindows64" , "Standalone" } , { "StandaloneWindows" , "Standalone" } , { "Android" , "Android" } , { "WebGL" , "WebGL" } } ;
15+ public static Dictionary < string , string > remapPlatformNames = new Dictionary < string , string > { { "StandaloneWindows64" , "Standalone" } , { "StandaloneWindows" , "Standalone" } , { "Android" , "Android" } , { "WebGL" , "WebGL" } } ;
1616
1717 // TODO separate scan and folders
1818 public static List < Project > Scan ( bool getGitBranch = false , bool getArguments = false , bool showMissingFolders = false , bool showTargetPlatform = false )
@@ -78,22 +78,6 @@ public static List<Project> Scan(bool getGitBranch = false, bool getArguments =
7878 projectName = projectPath ;
7979 }
8080
81- //string csprojFile = Path.Combine(projectPath, projectName + ".csproj");
82-
83- //// maybe 4.x or 2019 or later project
84- //if (folderExists == true && File.Exists(csprojFile) == false)
85- //{
86- // csprojFile = Path.Combine(projectPath, "Assembly-CSharp.csproj");
87- //}
88- //else if (folderExists == true && File.Exists(csprojFile) == false) // editor only project
89- //{
90- // csprojFile = Path.Combine(projectPath, projectName + ".Editor.csproj");
91- //}
92- //else if (folderExists == true && File.Exists(csprojFile) == false) // solution only
93- //{
94- // csprojFile = Path.Combine(projectPath, projectName + ".sln");
95- //}
96-
9781 // get last modified date from folder
9882 DateTime ? lastUpdated = folderExists ? Tools . GetLastModifiedTime ( projectPath ) : null ;
9983
@@ -114,13 +98,10 @@ public static List<Project> Scan(bool getGitBranch = false, bool getArguments =
11498 gitBranch = folderExists ? Tools . ReadGitBranchInfo ( projectPath ) : null ;
11599 }
116100
117- // TODO add option to disable check
118101 string targetPlatform = "" ;
119- //Platform targetPlatform = Platform.Unknown;
120102 if ( showTargetPlatform == true )
121103 {
122104 targetPlatform = folderExists ? Tools . GetTargetPlatform ( projectPath ) : null ;
123- //targetPlatform = folderExists ? Tools.GetTargetPlatform(projectPath) : Platform.Unknown;
124105 }
125106
126107 var p = new Project ( ) ;
@@ -130,18 +111,7 @@ public static List<Project> Scan(bool getGitBranch = false, bool getArguments =
130111 p . Modified = lastUpdated ;
131112 p . Arguments = customArgs ;
132113 p . GITBranch = gitBranch ;
133- //p.TargetPlatform = targetPlatform;
134- //Console.WriteLine("targetPlatform="+ targetPlatform);
135- // get matching buildtarget platform name from dictionary
136- if ( string . IsNullOrEmpty ( targetPlatform ) == false && remapPlatformNames . ContainsKey ( targetPlatform ) )
137- {
138- p . TargetPlatform = remapPlatformNames [ targetPlatform ] ;
139- }
140- else
141- {
142- if ( string . IsNullOrEmpty ( targetPlatform ) == false ) Console . WriteLine ( "Missing buildTarget remap name for: " + targetPlatform ) ;
143- p . TargetPlatform = null ;
144- }
114+ p . TargetPlatform = targetPlatform ;
145115
146116 // bubblegum(TM) solution, fill available platforms for this unity version, for this project
147117 p . TargetPlatforms = Tools . GetPlatformsForUnityVersion ( projectVersion ) ;
0 commit comments