C#] [Export] does not support struct types (GD0102), inconsistent with GDScript struct support
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by tracing the GD0102 diagnostic for exported C# members and the export type validation path; the issue names no source files or tests. Check how GDScript struct support is represented and compare it with C#/Mono exports. Done means either C# struct fields can be exported with suitable coverage, or the limitation is documented clearly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Tested versions
Latest Redot stable build.
System information
Window 11
Issue description
GDScript has support for struct types, but the equivalent C#/Mono side does not — marking a C# struct field with [Export] fails to compile with GD0102. This is inconsistent: both GDScript and C# are first-class scripting languages in Redot, but only one of them can use structs as an exportable grouping of related fields.
Expected: a C# struct should be exportable via [Export], consistent with GDScript's struct support — or, if this is intentionally unsupported, it should be documented clearly as a known C#/Mono limitation rather than failing with a generic "type not supported" diagnostic.
Actual: the project fails to build entirely, and they say that struct are not supported.
Steps to reproduce
Create a C# script with a [Export] field typed as a custom struct.
Attempt to build the project.
Build fails with GD0102.
Minimal reproduction code:
public partial class Test : Node
{
[Export] Stats stats;
}
public partial struct Stats
{
public int health;
public int maxHealth;
public int level;
public int maxLevel;
}
Error output:
GD0102: The type of the exported member 'Test.stats' is not supported
Minimal reproduction project (MRP)
Not needed just create a new mono project and export the C# struct as a member it will throw an error.
- Lingua principale
- C++
- Stelle
- 6.1k
- Fork
- 337
- Merge medio
- 5g 8h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Redot-Engine/redot-engine
-
Trait is not being resolvedApertabug topic:gdscript
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
Redot-Engine/redot-engine#1588 ·
I maintainer di solito rispondono entro 1 giorno
-
Handle stateful audio effects when a bus channel becomes inactiveForse già presa @GeneralProtectionFault l’ha presa 27 giorni fa. Aperta
Redot-Engine/redot-engine#1584 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug usability
Difficoltà 3/5 1-2 giorni Idoneità per principianti 53/100
Redot-Engine/redot-engine#1583 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug confirmed topic:3d topic:rendering
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Redot-Engine/redot-engine#1568 ·
I maintainer di solito rispondono entro 1 giorno
-
bug enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 57/100
Redot-Engine/redot-engine#1559 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Redot-Engine/redot-engine
Issue simili
-
Make the HTTP server's keep-alive and headers timeouts configurableForse già presa @mattgodbolt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
compiler-explorer/compiler-explorer#9902 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Nixtla/statsforecast#1371 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: pip install -U cudaq-qec fails with a conflict that names cudaq-qec itselfForse già presa @fedonman l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
task
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
SparseLinearAlgebra/spla#316 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno