Get node not working despite specified path (C#)

Godot Version

3.5.2 stable mono

Question

Getting back into scripting using vs code, get node does not recognize “Player” sprite despite specifying path.


I think you are mixing absolute and relative node paths. (get_node() documentation)

If you want to get the Player node with the path relative to your current Node2D node, then the path is just "Player"

If you want to get the Player node from a global path, the path would be "root/Node2D/Player"

I would advise you to use relative paths, because you are more flexible this way (no need to know in which scene you are currently in)