You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have C#-defined resources that get injected as exports into GDScript, and while methods, signals, and read/write properties surface as expected, it looks like readonly properties are not. Trying to access them results in errors like: Invalid get index 'str2' (on base: 'Node2D (TestNode.cs)').
This looks likely related to the code generator. This screenshot from my sample project shows that the read/write property has 4 references (from generated code) while the readonly property has zero:
Steps to reproduce
Create a C# script that extends Resource or a node type. My actual project is using resources; the repro project extending Node2D
Add a readonly property (using getter or lambda syntax) to the C# script. Note the lack of references from generated code.
Create a GDScript with an export compatible with the C# script
…irror
Since godotengine/godot#67167 is complete but wasn't the only issue - I get the impression naked C# interfaces will never be GDscript-accessible, only GodotObject subclasses will be accessible in GDscript
Treer
added a commit
to Treer/WorldWanderer
that referenced
this issue
Mar 20, 2024
…irror
Since godotengine/godot#67167 is complete but wasn't the only issue - I get the impression naked C# interfaces will never be GDscript-accessible, only GodotObject subclasses will be accessible in GDscript
Godot version
v4.0.beta2.mono.official
System information
Linux Mint 20.3 Cinnamon
Issue description
I have C#-defined resources that get injected as exports into GDScript, and while methods, signals, and read/write properties surface as expected, it looks like readonly properties are not. Trying to access them results in errors like: Invalid get index 'str2' (on base: 'Node2D (TestNode.cs)').
This looks likely related to the code generator. This screenshot from my sample project shows that the read/write property has 4 references (from generated code) while the readonly property has zero:
Steps to reproduce
Minimal reproduction project
ReadonlyPropertyRepro.zip
The text was updated successfully, but these errors were encountered: