0 votes

I have been looking on how to access a node's name, and have found get_name() method as well as node.name, and get('name'). All of these works the same, but only get_name() doesn't autocomplete nor does it tell me it's a valid method until i put parentheses on the end.

Is that a bug or am i missing something ?

in Engine by (12 points)

What may be happening is that the editor can't resolve the object to a known Node. If I recall, when you put parentheses on it, the editor shows it as a function, even when it isn't a function of the object.

1 Answer

+1 vote

The editor won't show you the getters if there is a property access to it, otherwise it will flood the suggestions with redundant methods.

by (7,898 points)

Thank you, is there such information in the docs about such rules ?

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 webmaster@godotengine.org with your username.