Closed DontStopThinking closed 3 months ago
Okay, after another try, turns out I had two Godot editors open with two separate projects when I got this error. And it seems the extension was speaking to the wrong editor which is why it couldn't find test_utils.gd
, which only existed in one project.
Both of my projects had similar folder structure which is why I didn't realize that it was actually speaking to the wrong editor! Apologies for the confusion, I'll close this issue.
Godot version
4.2.1-stable
VS Code version
1.87.2
Godot Tools VS Code extension version
2.0.0
System information
Windows 11
Issue description
I have a GDScript file that is not attached to any node and just contains a static function:
I then import this file in other scripts like so:
This works fine in Godot itself. However, it appears that the extension does not recognize that this file exists and complains:![test_utils_file_explorer](https://github.com/godotengine/godot-vscode-plugin/assets/36737173/7b5e8f29-d824-442f-95e7-3096a08f8a97)
Also notice that the file path does not appear in the intellisense dropdown:
Here,
player.gd
, which is attached to a node, appears fine in the dropdown.Steps to reproduce
preload()
that file in another script. E.g.const TestUtils = preload("res://game/scripts/test_utils.gd")
"Preload file "res://game/scripts/test_utils.gd" does not exist.gdscript(-1)"
.