godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.47k stars 148 forks source link

Generate wrong node path when dragging node from scene preview tree into gds file #640

Open milkiq opened 2 months ago

milkiq commented 2 months ago

Godot version

4.2.1

VS Code version

1.87.2

Godot Tools VS Code extension version

2.0.0

System information

Windows 11

Issue description

Such as this scene and script.

image

When I drag NavigationRegion2D node from preview tree into script file, tools generate $NavigationRegion2D

But at this example, script bind on player node, correct path is $"../NavigationRegion2D"

Steps to reproduce

As above