diff --git a/editor/shader/shader_editor_plugin.cpp b/editor/shader/shader_editor_plugin.cpp index b32077520cf..12d4ef41171 100644 --- a/editor/shader/shader_editor_plugin.cpp +++ b/editor/shader/shader_editor_plugin.cpp @@ -174,9 +174,7 @@ void ShaderEditorPlugin::edit(Object *p_object) { } else { es.shader_editor = memnew(TextShaderEditor); } - // Needs to be deferred so it's called after entering the scene tree, - // otherwise it won't be able to correctly fetch the editor theme. - callable_mp(es.shader_editor, &ShaderEditor::edit_shader).call_deferred(es.shader); + es.shader_editor->edit_shader(es.shader); } // TextShaderEditor-specific setup code.