-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot 4.0.1 stable - GDScript autocomplete for parent classes' properties and methods not working #75040
Comments
The result of You need to add type hints to get working autocompletion: var mob_spawn_location: Node2D = $MobPath/MobSpawnLocation |
I'm not sure I follow you.. The |
The function |
Does it work if you use |
I've tested and can reproduce. Here is a minimal reproduction code func _ready():
var child = $Node2D
rotation = child.rotation # rotation won't autocomplete here To reproduce you need both to store the node in a variable and to try to autocomplete in an assignement |
I have noticed similar behavior with autocomplete not working, even with type hints, though having nothing to do with parent classes (as noted in the title). The following GIF is from version v4.1.2.stable.official [399c9dc] and the As far as I understand it, the type hint of |
For the problem with type hints not working see #74888. The unique problem here is what was described by ajreckof. |
The problem is with this code. Using IMHO we should just remove |
Godot version
4.0.1 stable (cacf499)
System information
Windows 10 x64 22H2
Issue description
GDscript autocomplete for parent classes' inherited properties does not work. Not sure if it's a global problem, or just specific to the one I've found (completely new to Godot, actually was just following through the 2D tutorial).
Steps to reproduce
Path2D
(named MobPath) and then aPathFollow2D
as a child (named MobSpawnLocation)$MobPath/MobSpawnLocation
orget_node("MobPath/MobSpawnLocation")
(doesn't matter)position
orrotation
properties of this object - autocomplete does not offer it up.Both of these properties are inherited from the
Node2D
parent class.Tried finding any other inherited property or class coming from
Node2D
, not working.Tried finding any other inherited property or class coming from other parent classes, not working either.
Example: part of the script from the tutorial
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: