From e3511dd9d7637488368fbf82b53a029fa70fce5e Mon Sep 17 00:00:00 2001 From: kobewi Date: Mon, 2 May 2022 23:21:15 +0200 Subject: Fix tscn not listed as Resource extension --- 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 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"); } } -- cgit v1.2.3