Autocomplete does not work for node properties in Godot 4.2, but work in 4.1

Godot Version

4.2

Question

Autocomplete does not work for node properties in Godot 4.2, but work in 4.1.
This can be seen in the images below.
Why is this happening?
Please, help me and sorry for my bad english.

1 Like

Instead of direct making references to the node name (like $TimerGrenade) in the code, use a variable (Ctrl-drag the node to the editor, if you’re on Windows) that you reference instead. Then type that variable with the node class (for example “as Sprite2D”). That’ll fix the autocompletion, even though you’ll need to restructure your code a bit (but not in a bad way IMO).

1 Like

For first thank you for your reply.
I have the same issue and what you suggested above is not solved the issue for me.

Everything was fine until 4.2 so it must be some issue with engine or with our editor, i already tried fresh install and still have the issue.

1 Like

Did you use := to assign the node variable? If you don’t, the type can change at any time and that would not help the auto completion.

It seems likely that there’s a bug introduced somewhere recently regarding direct node names and auto completion , since there has been lots of work with static typing for 4.2.

This is probably the easiest workaround for this issue.

Still was quite surprised when I found this. Probably just a bug that they are working to fix!