-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
anyFolder does not work #664
Comments
Here is a minimum project that illustrates the bug. When When
This is the folder structure of the project.
©generated by Project Tree Generator |
This isn't really a bug. Determining the scene that's associated with a given script is nontrivial if it's not in the same folder.
Please note the emphasis: this setting is for the Scene Preview, and has no relation to launching scenes, pinned or otherwise. Are you aware that you can just pin the scene you're interested in launching? You can either open the |
Thank you for the quick reply. I have been playing with I'm aware I can pin the script (or the scene) but it does not address the problem. It's possible I'm asking for a feature that does not exist. Does a script and its scene need to be in the same folder in order to run that script? |
I must not understand what you're trying to do, because to me this seems like a direct solution to your problem.
Yeah, that's correct. There's no such thing as "running a script", all you can do is start the engine with a specific scene as the root/target. Given that there's no actual link from script -> scene, the best the extension can do is guess, so in order to prevent confusing and wrong behavior (eg, launching the wrong scene), this feature is restricted to matching filenames in the same folder. |
The problem is running a script whose scene is in another folder. But I get it now. This is not a bug. I will close the ticket. Thank you for your quick replies and patience. |
Pin the scene file you want, then run the "debug pinned scene" command? You can also use profiles in |
Once again, the Scene Preview is completely unrelated, and pinning something in the Scene Preview has no effect on launching scenes. |
I thought that was the case but this is what you said above:
This made me try to "Pin the scene file you want, then run the "debug pinned scene" command". Nonetheless, sure, it's fine. It is not possible to run scenes with a script elsewhere, pinned or otherwise. I get it. No worries. |
Wrong. Okay, let me try this one more time. Pinning the Scene Preview is NOT THE SAME as pinning the debug/launch target. That's why I explicitly told you to right click on the scene, which you did not do. Click on either of these two things: Look for the pin icon in these places: This scene is now pinned and will be launched when you run the |
Wow, that's a huge problem. Those options should definitely be available. Let me investigate this and get back to you. |
PR #665 renames the Scene Preview |
Thanks again. You rock Is there a workaround or some such I could do for now? |
Wow, I can't imagine how that's even possible... I'll try to finish up some open PRs this week and get a In the meantime I guess you can make a {
"version": "0.2.0",
"configurations": [
{
"name": "GDScript: Launch Project",
"type": "godot",
"request": "launch",
"scene": "<path/to/scene.tscn>"
}
]
} (If you tell me this doesn't work / is missing then I will have no choice but to recommend an exorcism) |
The service of an exorcist is not required. It works using that launch file. I will wait for Kudos. |
Godot version
4.2.2
VS Code version
1.90
Godot Tools VS Code extension version
2.0.0
System information
Windows 10
Issue description
The specific error when trying to run the pinned GDScript is:
The scene is in folder
'c:\someproject\scenes\world.tscn
Note that the extension works as expected if both files are in the same folder.
Also, note that I have changed the settings below in both user and workspace settings.
This is a deal breaker. Probably my mistake. If so, apologies.
Any workaround or clue would be most appreciated.
Thank you all.
Steps to reproduce
As explained above.
Place both files in the same folder and it works.
Place each file in a separate folder and it does not work.
The text was updated successfully, but these errors were encountered: