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

Can't unset values in exported typed array (of type node) via the editor #82034

Closed
mstarongithub opened this issue Sep 21, 2023 · 0 comments · Fixed by #82287
Closed

Can't unset values in exported typed array (of type node) via the editor #82034

mstarongithub opened this issue Sep 21, 2023 · 0 comments · Fixed by #82287

Comments

@mstarongithub
Copy link

Godot version

4.1.1 Stable

System information

Godot v4.1.1.stable - Fedora Linux 38 (Workstation Edition) - Vulkan (Forward+) - dedicated AMD Radeon RX 6600 XT (RADV NAVI23) () - AMD Ryzen 5 3600X 6-Core Processor (12 Threads)

Issue description

When exporting a Typed Array, where the type is set to Node, you can't unset elements previously added. The only way to remove the reference in the editor is to completely delete the array index.

When attempting to reset the entry to the empty default, the following error message pops up:

Attempted to set a variable of type 'NodePath' into a TypedArray of type 'Object'.
core/variant/array.cpp:413 - Condition "!_p->typed.validate(value, "set")" is true.

Steps to reproduce

The type Thing exports an Array[Thing] (also tested with Node as entry type)

In the root scene, open the inspector for one of the Thing nodes and add another Thing node to the exported array Arr. Then try resetting that index's value. The error message given in the issue description will pop up and the reference stays

Minimal reproduction project

bug_example.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