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

Exported arrays of type Array[Node] cannot have nodes assigned to them in editor. #74975

Closed
Puppyguarb opened this issue Mar 16, 2023 · 2 comments
Labels

Comments

@Puppyguarb
Copy link

Godot version

4.0.stable

System information

Windows 10, NVIDIA GeForce GTX 1650 SUPER, Vulkan

Issue description

Exporting an array with a type of Array[Node], where node can be any class that inherits from node, will result in an array that cannot have anything assigned to it from editor.

Interestingly, the Array appears to be typed Array[Object], rather than Array[Node]. Maybe related to #74712?
image

Steps to reproduce

  1. Create a script and attach it to a node.
  2. Export an array with type Array[Node]. Here is a simple way of how you could do that in code:
    @export var export_array : Array[Node] = []
  3. (optional) Add a new node into the currently open scene to add onto the array.
  4. Add an entry to the array with the drop-down on the right.
  5. Try and assign a node to the exported array.

Minimal reproduction project

Included below is a project with a main node, a node with the export script, an object node (which can be ignored if you prefer.), and an export script. I have added an extra line to the export script which should demonstrate how the export annotation usually behaves without an array.

ExportArrayIssueProject.zip

@RedworkDE
Copy link
Member

Duplicate of #62916

@YuriSizov
Copy link
Contributor

Yes, indeed. Thanks!

@YuriSizov YuriSizov closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants