From b0348d0e58815a0bf5a5e9aa4ad3f9219b86e1ae Mon Sep 17 00:00:00 2001 From: LuoZhihao Date: Thu, 17 Apr 2025 19:53:30 +0800 Subject: [PATCH] C#: Avoid StringName allocation in `GodotObject.Free` --- modules/mono/editor/bindings_generator.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index bc266cefe93..5852d135325 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -3123,9 +3123,8 @@ Error BindingsGenerator::_generate_cs_method(const BindingsGenerator::TypeInterf if (p_imethod.requires_object_call) { // Fallback to Godot's object.Call(string, params) - p_output.append(INDENT2 CS_METHOD_CALL "(\""); - p_output.append(p_imethod.name); - p_output.append("\""); + p_output.append(INDENT2 CS_METHOD_CALL "("); + p_output.append("MethodName." + p_imethod.proxy_name); for (const ArgumentInterface &iarg : p_imethod.arguments) { p_output.append(", ");