[.NET] Add IgnoreMember attribute to exclude members from Godot

Co-authored-by: kkjinping <ygkn1992@vip.qq.com>
This commit is contained in:
Raul Santos
2026-05-25 15:43:35 +02:00
parent fa6cad230f
commit 0095a79869
14 changed files with 73 additions and 3 deletions
@@ -110,7 +110,9 @@ namespace Godot.SourceGenerators
source.Append(symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));
source.Append("\n{\n");
var members = symbol.GetMembers();
var members = symbol.GetMembers()
.Where(m => !m.GetAttributes()
.Any(a => a.AttributeClass?.IsGodotIgnoreMemberAttribute() ?? false));
var propertySymbols = members
.Where(s => !s.IsStatic && s.Kind == SymbolKind.Property)