From 99e72894a20a4349d7172be3c2ee3bb7486fa007 Mon Sep 17 00:00:00 2001 From: Geequlim Date: Tue, 23 Jan 2018 13:01:12 +0800 Subject: [PATCH] Remote debugger send the real instance of WeakRef referenced to (cherry picked from commit 10f0451cc2e114d0077609359149c876589f0b42) --- core/script_debugger_remote.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index a297bb738fc..41071ace5df 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -598,7 +598,13 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { Array send_props; for (int i = 0; i < properties.size(); i++) { const PropertyInfo &pi = properties[i].first; - const Variant &var = properties[i].second; + Variant &var = properties[i].second; + + WeakRef *ref = Object::cast_to(var); + if (ref) { + var = ref->get_ref(); + } + RES res = var; Array prop;