diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 7f02148dfc0..14cdbc364e3 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -662,7 +662,7 @@ void EditorPlugin::make_visible(bool p_visible) { } void EditorPlugin::edit(Object *p_object) { - if (p_object->is_class("Resource")) { + if (Object::cast_to(p_object)) { GDVIRTUAL_CALL(_edit, Ref(Object::cast_to(p_object))); } else { GDVIRTUAL_CALL(_edit, p_object);