-
-
Couldn't load subscription status.
- Fork 23.5k
Open
Labels
Description
Godot version
4.0 Beta 11
System information
Win 10, Forward+, 1080ti, 516.94 driver
Issue description
Simply put if you try to get a node by using a StringName as an argument you'll get the error
Parser Error: Invalid argument for "get_node()" function: argument 1 should be "NodePath" but is "StringName".
which is likely an oversight because doing get_name() on a node gives a StringName.
I came across this when I was trying to loop through some nodes, checking names of nodes in an array vs the children of a node, but was able to easily work around it by making the array a string typed array
Steps to reproduce
I uploaded an mrp, but the code is as simple as
var nodeString = StringName("Node")
var test = get_node(nodeString)
Minimal reproduction project
Zireael07, thehappycheese, AThousandShips, Mickeon, nihiluis and 8 more