Skip to content

Commit

Permalink
Merge pull request #67023 from raulsntos/dotnet/fix-signal-callback-g…
Browse files Browse the repository at this point in the history
…eneration

C#: Fix signature of generated signal callbacks
  • Loading branch information
neikeq authored Dec 2, 2022
2 parents bf9cf7d + 86f6662 commit bcc061e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/mono/csharp_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,23 +391,23 @@ bool CSharpLanguage::supports_builtin_mode() const {
#ifdef TOOLS_ENABLED
static String variant_type_to_managed_name(const String &p_var_type_name) {
if (p_var_type_name.is_empty()) {
return "object";
return "Variant";
}

if (!ClassDB::class_exists(p_var_type_name)) {
if (ClassDB::class_exists(p_var_type_name)) {
return p_var_type_name;
}

if (p_var_type_name == Variant::get_type_name(Variant::OBJECT)) {
return "Godot.Object";
}

if (p_var_type_name == Variant::get_type_name(Variant::INT)) {
return "long";
}

if (p_var_type_name == Variant::get_type_name(Variant::FLOAT)) {
#ifdef REAL_T_IS_DOUBLE
return "double";
#else
return "float";
#endif
}

if (p_var_type_name == Variant::get_type_name(Variant::STRING)) {
Expand Down Expand Up @@ -485,7 +485,7 @@ static String variant_type_to_managed_name(const String &p_var_type_name) {
}
}

return "object";
return "Variant";
}

String CSharpLanguage::make_function(const String &, const String &p_name, const PackedStringArray &p_args) const {
Expand Down

0 comments on commit bcc061e

Please sign in to comment.