From 72e1088df6c95f41fa2f9dd90edf4b15e3564f34 Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 2 May 2022 23:21:15 +0200 Subject: [PATCH] Fix tscn not listed as Resource extension (cherry picked from commit e3511dd9d7637488368fbf82b53a029fa70fce5e) --- scene/resources/resource_format_text.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index dbc1d6aa846..ead1ecfcf7e 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1198,9 +1198,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"); } }