Allow direct reference of Node/Node2D/Node3D for an exported Array/Dictionary #11236
yosimba2000
started this conversation in
Editor
Replies: 1 comment
-
A Node is an Object, so if you had a way to pick a node in an Object picker in the inspector, then you could achieve what you're looking for. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue: An exported untyped Array
[Export] Godot.Collections.Array
gives no options to reference a Node/Node2D/Node3D directly. The only close option is to use a node path, which is a string and not a Node. There are no Node options in the image below.You CAN reference nodes directly if the exported Array is typed,
[Export] Godot.Collections.Array<Node3D>
.So if I can reference nodes directly using an exported typed array, doesn't that solve the issue? No, because it doesn't work for exported dictionaries. Exported dictionaries don't support nested types.
So if you have a
Godot.Collections.Dictionary< string , Godot.Collections.Array<Node3D> >
, you have no option to assign Nodes for the Dictionary value. At best, you can only assign Node Paths. This would be resolved if we were allowed to manually select Node/Node2D/Node3D types.Beta Was this translation helpful? Give feedback.
All reactions