1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

fix https://github.com/godotengine/godot/issues/104135 Generator for C# makes illegal code for a GodotObject with a primary ctor

Co-authored-by: Raul Santos <raulsntos@gmail.com>
This commit is contained in:
Ivan Shakhov
2025-03-16 08:55:46 +01:00
committed by Ivan Shakhov
parent 49cc57a75d
commit 724c0021c7
4 changed files with 150 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
using Godot;
using System;
[GlobalClass]
public partial class ExportedProperties2(int health, Resource subResource, string[] strings) : Resource
{
[Export]
public int Health { get; set; } = health;
[Export]
public Resource SubResource { get; set; } = subResource;
[Export]
public string[] Strings { get; set; } = strings ?? System.Array.Empty<string>();
}