Show dependency warning when removing remaps and fallback if translation

remap does not exist
This commit is contained in:
PucklaMotzer09
2022-01-04 18:52:32 +01:00
parent 0f9086e131
commit b32b570d7a
5 changed files with 54 additions and 1 deletions

View File

@ -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)) {