From 8cf34991c1da0ce91998fc2c3991af79ef35d317 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 4 Nov 2025 16:05:51 +0800 Subject: [PATCH] Allow previewing DPITexture in Inspector --- editor/scene/texture/texture_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/scene/texture/texture_editor_plugin.cpp b/editor/scene/texture/texture_editor_plugin.cpp index d3087b0ed5f..e674c3f4b14 100644 --- a/editor/scene/texture/texture_editor_plugin.cpp +++ b/editor/scene/texture/texture_editor_plugin.cpp @@ -40,9 +40,9 @@ #include "scene/resources/animated_texture.h" #include "scene/resources/atlas_texture.h" #include "scene/resources/compressed_texture.h" +#include "scene/resources/dpi_texture.h" #include "scene/resources/image_texture.h" #include "scene/resources/portable_compressed_texture.h" -#include "scene/resources/style_box_flat.h" constexpr const char *texture_2d_shader_code = R"( shader_type canvas_item; @@ -311,7 +311,7 @@ TexturePreview::TexturePreview(Ref p_texture, bool p_show_metadata) { } bool EditorInspectorPluginTexture::can_handle(Object *p_object) { - return Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr; + return Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr || Object::cast_to(p_object) != nullptr; } void EditorInspectorPluginTexture::parse_begin(Object *p_object) {