@@ -189,12 +189,11 @@ public static void ExploreFolder(string path)
189
189
// NOTE holding alt key (when using alt+o) brings up unity project selector
190
190
public static Process LaunchProject ( Project proj , DataGrid dataGridRef = null , bool useInitScript = false )
191
191
{
192
- // validate
192
+ Console . WriteLine ( "Launching project " + proj . Title + " at " + proj . Path ) ;
193
+
193
194
if ( proj == null ) return null ;
194
195
if ( Directory . Exists ( proj . Path ) == false ) return null ;
195
196
196
- Console . WriteLine ( "Launching project " + proj . Title + " at " + proj . Path ) ;
197
-
198
197
// check if this project path has unity already running? (from lock file or process)
199
198
// NOTE this check only works if previous unity instance was started while we were running
200
199
if ( ProcessHandler . IsRunning ( proj . Path ) )
@@ -223,17 +222,24 @@ public static Process LaunchProject(Project proj, DataGrid dataGridRef = null, b
223
222
return null ;
224
223
}
225
224
225
+ // check if project version has changed? (list is not updated, for example pulled new version from git)
226
+ var version = GetProjectVersion ( proj . Path ) ;
227
+
228
+ if ( string . IsNullOrEmpty ( version ) == false && version != proj . Version )
229
+ {
230
+ Console . WriteLine ( "Project version has changed from " + proj . Version + " to " + version ) ;
231
+ proj . Version = version ;
232
+ }
233
+
234
+ // check if we have this unity version installed
226
235
var unityExePath = GetUnityExePath ( proj . Version ) ;
227
236
if ( unityExePath == null )
228
237
{
229
238
DisplayUpgradeDialog ( proj , null ) ;
230
239
return null ;
231
240
}
232
241
233
- // SetStatus("Launching project in Unity " + version);
234
-
235
242
Process newProcess = new Process ( ) ;
236
-
237
243
try
238
244
{
239
245
var cmd = "\" " + unityExePath + "\" " ;
0 commit comments