Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot.NET.Sdk's GD0107 does not apply to exported members of type Node[] #94589

Closed
juanjp600 opened this issue Jul 21, 2024 · 0 comments · Fixed by #94599
Closed

Godot.NET.Sdk's GD0107 does not apply to exported members of type Node[] #94589

juanjp600 opened this issue Jul 21, 2024 · 0 comments · Fixed by #94599

Comments

@juanjp600
Copy link
Contributor

Tested versions

Reproducible in: 4.3.dev.mono [e25f3c0], 4.2.2.stable.mono.official

System information

Windows 10 - Godot v4.2.2.stable.mono

Issue description

Godot.NET.Sdk includes a diagnostic to prevent exports of nodes from resources. However, if you have an export of type Node[], this diagnostic doesn't kick in and the project compiles. This results in the ability to create malformed resources that do not work correctly across scenes or after a reload of the editor.

Steps to reproduce

  • Download the MRP, see attachment below
  • Open the scenes and MyResource.tres in a text editor. Observe that the Res field is defined for the nodes in the scenes, and the Nodes field is defined for the resources.
  • Import the project into Godot, and build it. Observe that no diagnostics kick in.
  • Observe that the resources have not loaded correctly.

Minimal reproduction project (MRP)

Csharp Export Diagnostics MRP.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants