1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Allow readonly and writeonly C# properties to be accessed from GDScript

This commit is contained in:
William Scalf
2023-08-13 18:35:10 -04:00
parent 7ba79d68bd
commit 41cf94e8b6
6 changed files with 69 additions and 33 deletions

View File

@@ -0,0 +1,10 @@
namespace Godot.SourceGenerators.Sample
{
public partial class AllReadOnly : GodotObject
{
public readonly string readonly_field = "foo";
public string readonly_auto_property { get; } = "foo";
public string readonly_property { get => "foo"; }
public string initonly_auto_property { get; init; }
}
}