-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 assign nodes to exported array #62916
Comments
Can confirm the issue is still present in alpha 14 |
Still present in alpha 15, furthermore, if you save and close the scene then reopen it, you get actual broken links. I'm not familiar with the source or proficient with cpp but looks like this might be caused by #59564 as it's really the only related changes I can see. Edit; I guess it could also be anything more general regarding the types nvm |
Following I noticed in beta 1: It doesn't show when you assigned anything but if you click on it the right node is preselected in the dialog. |
I can confirm that the bug is still present in beta5. |
We're up to beta 8 now though? |
Still an issue in Beta 8. Also applies to custom node types as well. |
I look at the source a month ago and it looked like it misinterpret the Nodes Type to be a Path if I recall correctly. |
Present in beta 10 also |
I believe this is the same bug. Godot Beta 10, Windows 10. Assigning null values to texture arrays (and I would guess other resource-derived item arrays) functions correctly in all circumstances save for assigning them in the editor. See project below: Run scene to see results from loaded resources with and without null values, and results from creating new resources and adding or changing values while including null. |
Still an issue in beta 12. Edit: still an issue in beta 13 (see #71603). |
Maybe this PR could solve this "old" thread |
Sorry to disappoint, but no (at least not yet). Unfortunately at this point I don't know much about editor side of things, but the issue is easily reproduced and common, so I hope that it will be fixed in not-so-distant future. |
Can reproduce, can easily add to array in scripting onready, but is def still a bug. |
A good workaround would be to leverage the new array functions. @export var switches: Array[Switch3D] would become @export var switch_nps: Array[NodePath]
@onready var switches = switch_nps.map(get_node) # feels hacky but works, not in editor though! |
Godot 4.0.1. In the console you can see that nodes are added to the array, but in the inspector itself the list is not displayed. |
Godot 4.0.1: no effect on adding Node to array via inspector, no messages in console, actual value is Null |
Thanks for your reports, but there is no need to continue confirming this issue. It's been reported enough times, and it's still not addressed. It will be closed when there is a PR fixing it. |
That was the obvious thing to try, but did not work for me immediately. This error was in the console.
I had to restart the editor to make it work. Godot version 4.0.2.stable. |
Stiil not fixed in 4.0.2.stable ? For me, at least. Have not tried @sairam4123 answer yet, but have same problem as on video. |
The PR which fixed this issue (referenced above, #73256) was merged in the It may be cherry-picked for 4.0.4 (not for 4.0.3, as we're still ironing out issues in the |
Found it fixed in Godot_v4.1-dev2. https://downloads.tuxfamily.org/godotengine/4.1/dev2/ Thank you, for help |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
@Legendilu Please provide a reproduction project for your issue. |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version
Godot 4.0 alpha 11
System information
Solus OS and Windows
Issue description
Can't assign nodes to an exported array of node pointers
output.mp4
Steps to reproduce
@export var node_pointer_array: Array[Node2D]
)Or: check out the minimal reproduction project below
Minimal reproduction project
export array of node pointers.zip
The text was updated successfully, but these errors were encountered: