1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Fix Global Class names cache not saved with upgrade to 4.4.

Co-authored-by: Hilderin <81109165+Hilderin@users.noreply.github.com>
This commit is contained in:
Agustín Marsero
2025-02-10 19:44:36 -05:00
parent f418603522
commit 2ba64a57c5
7 changed files with 50 additions and 40 deletions

View File

@@ -649,17 +649,11 @@ void EditorNode::_notification(int p_what) {
OS::get_singleton()->benchmark_begin_measure("Editor", "First Scan");
if (run_surface_upgrade_tool) {
run_surface_upgrade_tool = false;
SurfaceUpgradeTool::get_singleton()->connect("upgrade_finished", callable_mp(EditorFileSystem::get_singleton(), &EditorFileSystem::scan), CONNECT_ONE_SHOT);
SurfaceUpgradeTool::get_singleton()->finish_upgrade();
} else if (run_uid_upgrade_tool) {
run_uid_upgrade_tool = false;
UIDUpgradeTool::get_singleton()->connect("upgrade_finished", callable_mp(EditorFileSystem::get_singleton(), &EditorFileSystem::scan), CONNECT_ONE_SHOT);
UIDUpgradeTool::get_singleton()->finish_upgrade();
} else {
EditorFileSystem::get_singleton()->scan();
if (run_surface_upgrade_tool || run_uid_upgrade_tool) {
EditorFileSystem::get_singleton()->connect("filesystem_changed", callable_mp(this, &EditorNode::_execute_upgrades), CONNECT_ONE_SHOT);
}
EditorFileSystem::get_singleton()->scan();
}
} break;
@@ -901,6 +895,20 @@ void EditorNode::_update_update_spinner() {
OS::get_singleton()->set_low_processor_usage_mode(!update_continuously);
}
void EditorNode::_execute_upgrades() {
if (run_surface_upgrade_tool) {
run_surface_upgrade_tool = false;
// Execute another scan to reimport the modified files.
SurfaceUpgradeTool::get_singleton()->connect("upgrade_finished", callable_mp(EditorFileSystem::get_singleton(), &EditorFileSystem::scan), CONNECT_ONE_SHOT);
SurfaceUpgradeTool::get_singleton()->finish_upgrade();
} else if (run_uid_upgrade_tool) {
run_uid_upgrade_tool = false;
// Execute another scan to reimport the modified files.
UIDUpgradeTool::get_singleton()->connect("upgrade_finished", callable_mp(EditorFileSystem::get_singleton(), &EditorFileSystem::scan), CONNECT_ONE_SHOT);
UIDUpgradeTool::get_singleton()->finish_upgrade();
}
}
void EditorNode::init_plugins() {
_initializing_plugins = true;
Vector<String> addons;