@@ -243,11 +243,11 @@ protected override void _EnterTree()
243243
244244 if ( File . Exists ( EditorPath . ProjectCSProjPath ) )
245245 {
246- var efs = EditorInterface . Singleton . GetResourceFilesystem ( ) ;
247- efs . Connect ( EditorFileSystem . SignalName . FilesystemChanged , Callable . From ( RunUpgradeAssistant ) , ( uint ) ConnectFlags . OneShot ) ;
246+ RunUpgradeAssistant ( ) ;
248247 }
249248 else
250249 {
250+ EditorInternal . EditorResumeStartupSceneOpening ( ) ;
251251 _msbuildPanel . Close ( ) ;
252252 _toolBarBuildButton . Hide ( ) ;
253253 }
@@ -364,6 +364,22 @@ private void UpdateWorkspaceProjectPath()
364364 }
365365
366366 private void RunUpgradeAssistant ( )
367+ {
368+ var efs = EditorInterface . Singleton . GetResourceFilesystem ( ) ;
369+ if ( efs . IsScanning ( ) )
370+ {
371+ // If the filesystem is still scanning, we delay running the upgrade assistant
372+ // until it's done so we know the scenes and resources are ready.
373+ efs . Connect ( EditorFileSystem . SignalName . FilesystemChanged , Callable . From ( RunUpgradeAssistantCore ) , ( uint ) ConnectFlags . OneShot ) ;
374+ }
375+ else
376+ {
377+ // Otherwise, we just run it directly.
378+ RunUpgradeAssistantCore ( ) ;
379+ }
380+ }
381+
382+ private void RunUpgradeAssistantCore ( )
367383 {
368384 if ( ! File . Exists ( EditorPath . ProjectCSProjPath ) )
369385 {
@@ -399,6 +415,8 @@ private void RunUpgradeAssistant()
399415 // Unregister temporary classes in reverse order.
400416 GodotRegistry . UnregisterClass < ResourceFormatLoaderCSharpScript > ( ) ;
401417 GodotRegistry . UnregisterClass < CSharpScript > ( ) ;
418+
419+ EditorInternal . EditorResumeStartupSceneOpening ( ) ;
402420 }
403421 }
404422
0 commit comments