From a1f63bac0e57b653c452c6b08a72877031d14741 Mon Sep 17 00:00:00 2001 From: volzhs Date: Tue, 1 Dec 2020 01:09:00 +0900 Subject: [PATCH] Fix editor locked by generating preview of dynamic font --- editor/plugins/editor_preview_plugins.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 2dce70f3111..768879cf219 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -834,7 +834,9 @@ bool EditorFontPreviewPlugin::handles(const String &p_type) const { Ref EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const { - RES res = ResourceLoader::load(p_path); + Ref ril = ResourceLoader::load_interactive(p_path); + ril.ptr()->wait(); + RES res = ril.ptr()->get_resource(); Ref sampled_font; if (res->is_class("DynamicFont")) { sampled_font = res->duplicate();