31 / GodotOnReady

A C# Source Generator that adds convenient onready-like features to your C# scripts in Godot Mono (3.x) without any reflection.
https://www.nuget.org/packages/GodotOnReady
MIT License
123 stars 13 forks source link

Generated partial classes should match access modifiers #50

Closed paulloz closed 2 years ago

paulloz commented 2 years ago

The following code will not compile using GodotOnReady. The generated partial class is going to be public, raising CS0262.

internal partial class Foo : Node
{
    [OnReadyGet("Foo")]
    private Node foo;
}
31 commented 2 years ago

Good catch. Best way to fix is to actually not have any access modifiers, IIRC.

31 commented 2 years ago

Fixed in 1.2.3. Validation in progress on the NuGet gallery.

31 commented 2 years ago

Done, and thanks, by the way. 😄