diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-03 00:03:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 00:03:30 +0200 |
commit | 87622861106b4bb06040a603060bedc2835648ba (patch) | |
tree | 34cc0b3ab3cafab4559333d25626949244a61e49 | |
parent | 7f181494d1903e37e9d5af71946e88fd58fb5a74 (diff) | |
parent | e3511dd9d7637488368fbf82b53a029fa70fce5e (diff) |
Merge pull request #60713 from KoBeWi/packed_resource
Fix tscn not listed as Resource extension
-rw-r--r-- | scene/resources/resource_format_text.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index a239bf1ab9..7eeb3f5f85 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1363,9 +1363,12 @@ void ResourceFormatLoaderText::get_recognized_extensions_for_type(const String & return; } - if (p_type == "PackedScene") { + if (ClassDB::is_parent_class("PackedScene", p_type)) { p_extensions->push_back("tscn"); - } else { + } + + // Don't allow .tres for PackedScenes. + if (p_type != "PackedScene") { p_extensions->push_back("tres"); } } |