get_node("node") or get_node(@"node")

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Lazarwolfe

Been reading through some of the Godot examples and find that there’s a lot of instances of get_node(@"node/address")

This might be a terribly dumb question, however, I can’t help but wonder if there’s a difference between adding the @sign as a prefix of the node address or not.

:bust_in_silhouette: Reply From: Ertain

From what I’ve read, the “@” symbol turns a path (like @"/root/node/control) into a NodePath, which get_node() uses. A NodePath is great for exporting to the editor.

So
"/Path/More_Path" is just a String
@"/Another/Path/Node" is a NodePath
$"/Path/Path/Path" is a Reference to a Node

do i get this right?

whiteshampoo | 2021-02-04 07:23