1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #65907 from magian1127/4.0FixPropertiesGenerator

C#: Fix Generated ScriptProperty Error.
This commit is contained in:
Ignacio Roldán Etcheverry
2022-11-28 01:48:52 +01:00
committed by GitHub
3 changed files with 150 additions and 11 deletions

View File

@@ -292,7 +292,7 @@ namespace Godot.SourceGenerators
source.Append("if (name == PropertyName.")
.Append(propertyMemberName)
.Append(") {\n")
.Append(" ")
.Append(" this.")
.Append(propertyMemberName)
.Append(" = ")
.AppendNativeVariantToManagedExpr("value", propertyTypeSymbol, propertyMarshalType)
@@ -317,7 +317,7 @@ namespace Godot.SourceGenerators
.Append(propertyMemberName)
.Append(") {\n")
.Append(" value = ")
.AppendManagedToNativeVariantExpr(propertyMemberName, propertyMarshalType)
.AppendManagedToNativeVariantExpr("this." + propertyMemberName, propertyMarshalType)
.Append(";\n")
.Append(" return true;\n")
.Append(" }\n");