mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Restore script class cache if removed
I have no idea why anyone would do this, but this fixes it. Fixes #72154. Depends on #72444 being merged to function properly.
This commit is contained in:
@@ -1591,6 +1591,11 @@ void EditorFileSystem::_update_script_classes() {
|
||||
void EditorFileSystem::_update_pending_script_classes() {
|
||||
if (!update_script_paths.is_empty()) {
|
||||
_update_script_classes();
|
||||
} else {
|
||||
// In case the class cache file was removed somehow, regenerate it.
|
||||
if (ScriptServer::has_global_classes() && !FileAccess::exists(ScriptServer::get_global_class_cache_file_path())) {
|
||||
ScriptServer::save_global_classes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user