diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_loader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index fc4177004b..3e595557f9 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -819,6 +819,12 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem if (r_translation_remapped) { *r_translation_remapped = true; } + + // Fallback to p_path if new_path does not exist. + if (!FileAccess::exists(new_path)) { + WARN_PRINT(vformat("Translation remap '%s' does not exist. Falling back to '%s'.", new_path, p_path)); + new_path = p_path; + } } if (path_remaps.has(new_path)) { |