Parcourir la source

Remote debugger send the real instance of WeakRef referenced to

Geequlim il y a 7 ans
Parent
commit
10f0451cc2
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      core/script_debugger_remote.cpp

+ 7 - 1
core/script_debugger_remote.cpp

@@ -598,7 +598,13 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) {
 	Array send_props;
 	Array send_props;
 	for (int i = 0; i < properties.size(); i++) {
 	for (int i = 0; i < properties.size(); i++) {
 		const PropertyInfo &pi = properties[i].first;
 		const PropertyInfo &pi = properties[i].first;
-		const Variant &var = properties[i].second;
+		Variant &var = properties[i].second;
+
+		WeakRef *ref = Object::cast_to<WeakRef>(var);
+		if (ref) {
+			var = ref->get_ref();
+		}
+
 		RES res = var;
 		RES res = var;
 
 
 		Array prop;
 		Array prop;