poohcom1 / GodotInterfaceExport

Godot C# package to support exporting interface types!
https://www.nuget.org/packages/GodotInterfaceExport
Other
5 stars 0 forks source link

Support accessibility modifier and nullable #5

Open poohcom1 opened 9 months ago

poohcom1 commented 9 months ago

Currently, generated properties are hard-coded to be private and non-null. We can improve this by having it inherit the modifier and nullability of whatever node it's generated from:

[Export]
[ExportInterface(typeof(IComponentA))]
public Node? ComponentANode { set; get; }

// Generated
public IComponentA? ComponentA { set; get; } // public and nullable