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

Using "Edit" on an exported node property in the inspector permanently breaks the reference #93808

Closed
MajorMcDoom opened this issue Jul 1, 2024 · 1 comment · Fixed by #90047

Comments

@MajorMcDoom
Copy link
Contributor

MajorMcDoom commented Jul 1, 2024

Tested versions

Reproducible in 4.3.beta2

System information

Godot v4.3.beta2 - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 32.0.15.5599) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 Threads)

Issue description

Manually editing the node path of an exported node will result in the reference being permanently broken. "Permanent" in this case means until you manually reassign the reference through selection, which isn't possible for hidden children of scene instances. The property field will correctly display the referenced node, but at runtime, it will be null.

This breakage happens even if you do not actually change the node path (just click edit, and hit enter or escape).

The breakage happens because the node_paths part of the node that contains the reference gets wiped out. For example, in the context of the attached project, the correct version of the scene file shows this for the root node (the node containing the reference):
[node name="test" type="Node" node_paths=PackedStringArray("box")]
But the broken version of the scene file shows this:
[node name="test" type="Node"]

Steps to reproduce

  • Open the attached project and run the scene.
  • Note the console prints out the box referenced by the root node.
  • Stop the scene.
  • Select the root node, and use the Edit option on its exported Box property.
  • Hit [Enter].
  • Run the scene again.
  • Note that the console now prints out <null>.

Minimal reproduction project (MRP)

bug-report.zip

@TheSofox
Copy link
Contributor

Created PR to fix this issue.

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