diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index f823900744f..df0612450f6 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -913,6 +913,12 @@ bool EditorFileSystem::_update_scan_actions() { // Re-assign the UID to file, just in case it was pulled from cache. ResourceSaver::set_uid(new_file_path, existing_id); } + } else if (ResourceLoader::should_create_uid_file(new_file_path)) { + Ref f = FileAccess::open(new_file_path + ".uid", FileAccess::WRITE); + if (f.is_valid()) { + ia.new_file->uid = ResourceUID::get_singleton()->create_id(); + f->store_line(ResourceUID::get_singleton()->id_to_text(ia.new_file->uid)); + } } if (ClassDB::is_parent_class(ia.new_file->type, SNAME("Script"))) {