+2 votes

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.

Godot version 3.1
in Engine by (27 points)

1 Answer

+1 vote

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.

by (3,062 points)

"/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?

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.