diff options
Diffstat (limited to 'editor/dependency_editor.cpp')
-rw-r--r-- | editor/dependency_editor.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index eaafad7ab8..3660e7f285 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -191,10 +191,16 @@ void DependencyEditor::_update_list() { ResourceUID::ID uid = ResourceUID::get_singleton()->text_to_id(path); if (uid != ResourceUID::INVALID_ID) { - // dependency is in uid format, obtain proper path - ERR_CONTINUE(!ResourceUID::get_singleton()->has_id(uid)); - - path = ResourceUID::get_singleton()->get_id_path(uid); + // Dependency is in uid format, obtain proper path. + if (ResourceUID::get_singleton()->has_id(uid)) { + path = ResourceUID::get_singleton()->get_id_path(uid); + } else if (n.get_slice_count("::") >= 3) { + // If uid can't be found, try to use fallback path. + path = n.get_slice("::", 2); + } else { + ERR_PRINT("Invalid dependency UID and fallback path."); + continue; + } } String name = path.get_file(); |