From 925b690c989dea13d0dfc06d2a7b1edc8de6b34f Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Sun, 9 Jun 2024 15:21:41 -0500 Subject: Core: Integrate `Ref::instantiate` where possible --- modules/mono/csharp_script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/mono/csharp_script.cpp') diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 6ae9ce56c6..380b401683 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2826,7 +2826,7 @@ Ref ResourceFormatLoaderCSharpScript::load(const String &p_path, const GDMonoCache::managed_callbacks.ScriptManagerBridge_GetOrCreateScriptBridgeForPath(&p_path, &scr); ERR_FAIL_COND_V_MSG(scr.is_null(), Ref(), "Could not create C# script '" + real_path + "'."); } else { - scr = Ref(memnew(CSharpScript)); + scr.instantiate(); } #if defined(DEBUG_ENABLED) || defined(TOOLS_ENABLED) -- cgit v1.2.3