From a5e9878ef89b04d55f997d22d6a426491bdc0db5 Mon Sep 17 00:00:00 2001 From: BrunoSXS Date: Sun, 20 Nov 2022 19:35:48 -0300 Subject: [PATCH] Fix for documentation not appearing in preview in editor inspector --- editor/editor_inspector.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 6e18bde3038..4822aab7d4a 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3114,11 +3114,24 @@ void EditorInspector::update_tree() { // Build the doc hint, to use as tooltip. // Get the class name. - StringName classname = doc_name == "" ? object->get_class_name() : doc_name; + StringName classname = doc_name; if (!object_class.is_empty()) { classname = object_class; } else if (Object::cast_to(object)) { classname = Object::cast_to(object)->get_edited_class_name(); + } else if (classname == "") { + classname = object->get_class_name(); + Resource *res = Object::cast_to(object); + if (res && !res->get_script().is_null()) { + // Grab the script of this resource to get the evaluated script class. + Ref