From 69bb7e5b1199e6af3256fe948dbfa3102c1ccbc8 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Wed, 23 Nov 2022 18:13:13 -0500 Subject: [PATCH] Fix singleton scene cyclic loading --- editor/editor_autoload_settings.cpp | 41 ++++++++++++------- main/main.cpp | 41 ++++++++++++------- modules/gdscript/gdscript_analyzer.cpp | 21 ++++++---- modules/gdscript/gdscript_cache.cpp | 25 ----------- modules/gdscript/gdscript_cache.h | 1 - .../gdscript/tests/gdscript_test_runner.cpp | 41 ++++++++++++------- 6 files changed, 91 insertions(+), 79 deletions(-) diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 598bcdc6390..8cb1dfd24e8 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -400,27 +400,38 @@ void EditorAutoloadSettings::_autoload_text_changed(const String p_name) { } Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { - Ref res = ResourceLoader::load(p_path); - ERR_FAIL_COND_V_MSG(res.is_null(), nullptr, "Can't autoload: " + p_path + "."); Node *n = nullptr; - Ref scn = res; - Ref