diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs
index ffde1359300..255720399b0 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptProperties.generated.cs
@@ -61,6 +61,10 @@ partial class ExportedFields
///
public new static readonly global::Godot.StringName @_fieldString = "_fieldString";
///
+ /// Cached name for the '_fieldStaticImport' field.
+ ///
+ public new static readonly global::Godot.StringName @_fieldStaticImport = "_fieldStaticImport";
+ ///
/// Cached name for the '_fieldVector2' field.
///
public new static readonly global::Godot.StringName @_fieldVector2 = "_fieldVector2";
@@ -305,6 +309,10 @@ partial class ExportedFields
this.@_fieldString = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
}
+ if (name == PropertyName.@_fieldStaticImport) {
+ this.@_fieldStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
+ return true;
+ }
if (name == PropertyName.@_fieldVector2) {
this.@_fieldVector2 = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
@@ -551,6 +559,10 @@ partial class ExportedFields
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_fieldString);
return true;
}
+ if (name == PropertyName.@_fieldStaticImport) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_fieldStaticImport);
+ return true;
+ }
if (name == PropertyName.@_fieldVector2) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_fieldVector2);
return true;
@@ -763,6 +775,7 @@ partial class ExportedFields
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldSingle, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldDouble, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_fieldString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fieldStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)5, name: PropertyName.@_fieldVector2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)6, name: PropertyName.@_fieldVector2I, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)7, name: PropertyName.@_fieldRect2, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs
index 4caf51dc5a0..7b43973bb68 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedFields_ScriptPropertyDefVal.generated.cs
@@ -11,7 +11,7 @@ partial class ExportedFields
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
internal new static global::System.Collections.Generic.Dictionary GetGodotPropertyDefaultValues()
{
- var values = new global::System.Collections.Generic.Dictionary(60);
+ var values = new global::System.Collections.Generic.Dictionary(61);
bool ___fieldBoolean_default_value = true;
values.Add(PropertyName.@_fieldBoolean, global::Godot.Variant.From(___fieldBoolean_default_value));
char ___fieldChar_default_value = 'f';
@@ -38,6 +38,8 @@ partial class ExportedFields
values.Add(PropertyName.@_fieldDouble, global::Godot.Variant.From(___fieldDouble_default_value));
string ___fieldString_default_value = "foo";
values.Add(PropertyName.@_fieldString, global::Godot.Variant.From(___fieldString_default_value));
+ float ___fieldStaticImport_default_value = global::Godot.Mathf.RadToDeg(2 * global::Godot.Mathf.Pi);
+ values.Add(PropertyName.@_fieldStaticImport, global::Godot.Variant.From(___fieldStaticImport_default_value));
global::Godot.Vector2 ___fieldVector2_default_value = new(10f, 10f);
values.Add(PropertyName.@_fieldVector2, global::Godot.Variant.From(___fieldVector2_default_value));
global::Godot.Vector2I ___fieldVector2I_default_value = global::Godot.Vector2I.Up;
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs
index 636cd82a118..2eb2e292ae1 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptProperties.generated.cs
@@ -33,10 +33,18 @@ partial class ExportedProperties
///
public new static readonly global::Godot.StringName @FullPropertyString_Complex = "FullPropertyString_Complex";
///
+ /// Cached name for the 'FullPropertyStaticImport' property.
+ ///
+ public new static readonly global::Godot.StringName @FullPropertyStaticImport = "FullPropertyStaticImport";
+ ///
/// Cached name for the 'LamdaPropertyString' property.
///
public new static readonly global::Godot.StringName @LamdaPropertyString = "LamdaPropertyString";
///
+ /// Cached name for the 'LambdaPropertyStaticImport' property.
+ ///
+ public new static readonly global::Godot.StringName @LambdaPropertyStaticImport = "LambdaPropertyStaticImport";
+ ///
/// Cached name for the 'PrimaryCtorParameter' property.
///
public new static readonly global::Godot.StringName @PrimaryCtorParameter = "PrimaryCtorParameter";
@@ -45,6 +53,10 @@ partial class ExportedProperties
///
public new static readonly global::Godot.StringName @ConstantMath = "ConstantMath";
///
+ /// Cached name for the 'ConstantMathStaticImport' property.
+ ///
+ public new static readonly global::Godot.StringName @ConstantMathStaticImport = "ConstantMathStaticImport";
+ ///
/// Cached name for the 'StaticStringAddition' property.
///
public new static readonly global::Godot.StringName @StaticStringAddition = "StaticStringAddition";
@@ -293,9 +305,17 @@ partial class ExportedProperties
///
public new static readonly global::Godot.StringName @_fullPropertyStringComplex = "_fullPropertyStringComplex";
///
+ /// Cached name for the '_fullPropertyStaticImport' field.
+ ///
+ public new static readonly global::Godot.StringName @_fullPropertyStaticImport = "_fullPropertyStaticImport";
+ ///
/// Cached name for the '_lamdaPropertyString' field.
///
public new static readonly global::Godot.StringName @_lamdaPropertyString = "_lamdaPropertyString";
+ ///
+ /// Cached name for the '_lambdaPropertyStaticImport' field.
+ ///
+ public new static readonly global::Godot.StringName @_lambdaPropertyStaticImport = "_lambdaPropertyStaticImport";
}
///
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
@@ -325,10 +345,18 @@ partial class ExportedProperties
this.@FullPropertyString_Complex = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
}
+ if (name == PropertyName.@FullPropertyStaticImport) {
+ this.@FullPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
+ return true;
+ }
if (name == PropertyName.@LamdaPropertyString) {
this.@LamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
}
+ if (name == PropertyName.@LambdaPropertyStaticImport) {
+ this.@LambdaPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
+ return true;
+ }
if (name == PropertyName.@PrimaryCtorParameter) {
this.@PrimaryCtorParameter = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
@@ -337,6 +365,10 @@ partial class ExportedProperties
this.@ConstantMath = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
}
+ if (name == PropertyName.@ConstantMathStaticImport) {
+ this.@ConstantMathStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
+ return true;
+ }
if (name == PropertyName.@StaticStringAddition) {
this.@StaticStringAddition = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
@@ -585,10 +617,18 @@ partial class ExportedProperties
this.@_fullPropertyStringComplex = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
}
+ if (name == PropertyName.@_fullPropertyStaticImport) {
+ this.@_fullPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
+ return true;
+ }
if (name == PropertyName.@_lamdaPropertyString) {
this.@_lamdaPropertyString = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
return true;
}
+ if (name == PropertyName.@_lambdaPropertyStaticImport) {
+ this.@_lambdaPropertyStaticImport = global::Godot.NativeInterop.VariantUtils.ConvertTo(value);
+ return true;
+ }
return base.SetGodotClassPropertyValue(name, value);
}
///
@@ -619,10 +659,18 @@ partial class ExportedProperties
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@FullPropertyString_Complex);
return true;
}
+ if (name == PropertyName.@FullPropertyStaticImport) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@FullPropertyStaticImport);
+ return true;
+ }
if (name == PropertyName.@LamdaPropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@LamdaPropertyString);
return true;
}
+ if (name == PropertyName.@LambdaPropertyStaticImport) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@LambdaPropertyStaticImport);
+ return true;
+ }
if (name == PropertyName.@PrimaryCtorParameter) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@PrimaryCtorParameter);
return true;
@@ -631,6 +679,10 @@ partial class ExportedProperties
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@ConstantMath);
return true;
}
+ if (name == PropertyName.@ConstantMathStaticImport) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@ConstantMathStaticImport);
+ return true;
+ }
if (name == PropertyName.@StaticStringAddition) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@StaticStringAddition);
return true;
@@ -879,10 +931,18 @@ partial class ExportedProperties
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_fullPropertyStringComplex);
return true;
}
+ if (name == PropertyName.@_fullPropertyStaticImport) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_fullPropertyStaticImport);
+ return true;
+ }
if (name == PropertyName.@_lamdaPropertyString) {
value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_lamdaPropertyString);
return true;
}
+ if (name == PropertyName.@_lambdaPropertyStaticImport) {
+ value = global::Godot.NativeInterop.VariantUtils.CreateFrom(this.@_lambdaPropertyStaticImport);
+ return true;
+ }
return base.GetGodotClassPropertyValue(name, out value);
}
///
@@ -904,10 +964,15 @@ partial class ExportedProperties
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@FullPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_fullPropertyStringComplex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@FullPropertyString_Complex, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_fullPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@FullPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@_lamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@LamdaPropertyString, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@_lambdaPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4096, exported: false));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@LambdaPropertyStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@PrimaryCtorParameter, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@ConstantMath, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
+ properties.Add(new(type: (global::Godot.Variant.Type)3, name: PropertyName.@ConstantMathStaticImport, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)4, name: PropertyName.@StaticStringAddition, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)1, name: PropertyName.@PropertyBoolean, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
properties.Add(new(type: (global::Godot.Variant.Type)2, name: PropertyName.@PropertyChar, hint: (global::Godot.PropertyHint)0, hintString: "", usage: (global::Godot.PropertyUsageFlags)4102, exported: true));
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs
index 57829cc226b..7db27a01b7a 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/GeneratedSources/ExportedProperties_ScriptPropertyDefVal.generated.cs
@@ -11,7 +11,7 @@ partial class ExportedProperties
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
internal new static global::System.Collections.Generic.Dictionary GetGodotPropertyDefaultValues()
{
- var values = new global::System.Collections.Generic.Dictionary(67);
+ var values = new global::System.Collections.Generic.Dictionary(70);
string __NotGenerateComplexLamdaProperty_default_value = default;
values.Add(PropertyName.@NotGenerateComplexLamdaProperty, global::Godot.Variant.From(__NotGenerateComplexLamdaProperty_default_value));
string __NotGenerateLamdaNoFieldProperty_default_value = default;
@@ -24,12 +24,18 @@ partial class ExportedProperties
values.Add(PropertyName.@FullPropertyString, global::Godot.Variant.From(__FullPropertyString_default_value));
string __FullPropertyString_Complex_default_value = new string("FullPropertyString_Complex") + global::System.Convert.ToInt32("1");
values.Add(PropertyName.@FullPropertyString_Complex, global::Godot.Variant.From(__FullPropertyString_Complex_default_value));
+ float __FullPropertyStaticImport_default_value = global::Godot.Mathf.Pi;
+ values.Add(PropertyName.@FullPropertyStaticImport, global::Godot.Variant.From(__FullPropertyStaticImport_default_value));
string __LamdaPropertyString_default_value = "LamdaPropertyString";
values.Add(PropertyName.@LamdaPropertyString, global::Godot.Variant.From(__LamdaPropertyString_default_value));
+ float __LambdaPropertyStaticImport_default_value = global::Godot.Mathf.Tau;
+ values.Add(PropertyName.@LambdaPropertyStaticImport, global::Godot.Variant.From(__LambdaPropertyStaticImport_default_value));
string __PrimaryCtorParameter_default_value = default;
values.Add(PropertyName.@PrimaryCtorParameter, global::Godot.Variant.From(__PrimaryCtorParameter_default_value));
float __ConstantMath_default_value = 2 * global::Godot.Mathf.Pi;
values.Add(PropertyName.@ConstantMath, global::Godot.Variant.From(__ConstantMath_default_value));
+ float __ConstantMathStaticImport_default_value = global::Godot.Mathf.RadToDeg(2 * global::Godot.Mathf.Pi);
+ values.Add(PropertyName.@ConstantMathStaticImport, global::Godot.Variant.From(__ConstantMathStaticImport_default_value));
string __StaticStringAddition_default_value = string.Empty + string.Empty;
values.Add(PropertyName.@StaticStringAddition, global::Godot.Variant.From(__StaticStringAddition_default_value));
bool __PropertyBoolean_default_value = true;
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs
index 07ae5cb6842..9987a98224f 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedFields.cs
@@ -1,6 +1,7 @@
using Godot;
using System;
using System.Collections.Generic;
+using static Godot.Mathf;
public partial class ExportedFields : GodotObject
{
@@ -18,6 +19,9 @@ public partial class ExportedFields : GodotObject
[Export] private Double _fieldDouble = 10;
[Export] private String _fieldString = "foo";
+ // Static import
+ [Export] private Single _fieldStaticImport = RadToDeg(2 * Pi);
+
// Godot structs
[Export] private Vector2 _fieldVector2 = new(10f, 10f);
[Export] private Vector2I _fieldVector2I = Vector2I.Up;
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs
index 2f55bcf6125..1c6f9522c12 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/ExportedProperties.cs
@@ -1,5 +1,6 @@
using Godot;
using System;
+using static Godot.Mathf;
public partial class ExportedProperties(string primaryCtorParameter) : GodotObject
{
@@ -82,6 +83,20 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
}
}
+ private Single _fullPropertyStaticImport = Pi;
+ [Export]
+ public Single FullPropertyStaticImport
+ {
+ get
+ {
+ return _fullPropertyStaticImport;
+ }
+ set
+ {
+ _fullPropertyStaticImport = value;
+ }
+ }
+
// Lambda Property
private String _lamdaPropertyString = "LamdaPropertyString";
[Export]
@@ -91,6 +106,14 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
set => _lamdaPropertyString = value;
}
+ private Single _lambdaPropertyStaticImport = Tau;
+ [Export]
+ public Single LambdaPropertyStaticImport
+ {
+ get => _lambdaPropertyStaticImport;
+ set => _lambdaPropertyStaticImport = value;
+ }
+
// Primary Constructor Parameter
[Export]
public String PrimaryCtorParameter { get; set; } = primaryCtorParameter;
@@ -99,6 +122,10 @@ public partial class ExportedProperties(string primaryCtorParameter) : GodotObje
[Export]
public Single ConstantMath { get; set; } = 2 * Mathf.Pi;
+ //Constant Math Expression With Static Import
+ [Export]
+ public Single ConstantMathStaticImport { get; set; } = RadToDeg(2 * Pi);
+
// Static Strings Addition
[Export]
public string StaticStringAddition { get; set; } = string.Empty + string.Empty;
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
index bc6091562d7..c80747695f7 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/ExtensionMethods.cs
@@ -183,11 +183,13 @@ namespace Godot.SourceGenerators
private static SymbolDisplayFormat FullyQualifiedFormatOmitGlobal { get; } =
SymbolDisplayFormat.FullyQualifiedFormat
- .WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted);
+ .WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted)
+ .WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType);
private static SymbolDisplayFormat FullyQualifiedFormatIncludeGlobal { get; } =
SymbolDisplayFormat.FullyQualifiedFormat
- .WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Included);
+ .WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Included)
+ .WithMemberOptions(SymbolDisplayMemberOptions.IncludeContainingType);
public static string FullQualifiedNameOmitGlobal(this ITypeSymbol symbol)
=> symbol.ToDisplayString(NullableFlowState.NotNull, FullyQualifiedFormatOmitGlobal);
@@ -210,7 +212,7 @@ namespace Godot.SourceGenerators
private static void FullQualifiedSyntax(SyntaxNode node, SemanticModel sm, StringBuilder sb, bool isFirstNode)
{
- if (node is NameSyntax ns && isFirstNode)
+ if (node is NameSyntax ns && (isFirstNode || node.Parent is not MemberAccessExpressionSyntax))
{
SymbolInfo nameInfo = sm.GetSymbolInfo(ns);
sb.Append(nameInfo.Symbol?.ToDisplayString(FullyQualifiedFormatIncludeGlobal) ?? ns.ToString());