From 00f2e5be3abae2c6865a467984e500a0fda0d7ce Mon Sep 17 00:00:00 2001 From: LuoZhihao Date: Thu, 3 Apr 2025 18:32:04 +0800 Subject: [PATCH] Display PortableCompressedTexture's format in inspector preview --- editor/plugins/texture_editor_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index fcda832c911..e7b9b139492 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -124,6 +124,11 @@ static Image::Format get_texture_2d_format(const Ref &p_texture) { return compressed_texture->get_format(); } + const Ref portable_compressed_texture = p_texture; + if (portable_compressed_texture.is_valid()) { + return portable_compressed_texture->get_format(); + } + // AtlasTexture? // Unknown