godotengine / godot-vscode-plugin

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

Scene Preview is broken #646

Open StalOlympus opened 2 months ago

StalOlympus commented 2 months ago

Godot version

Godot v4.2.1-stable

VS Code version

Version: 1.88.1

Godot Tools VS Code extension version

2.0.0

System information

Windows 11

Issue description

When I add a script that has export fields to a scene and actually drag references to it, the scene preview on VSCode stays empty and nothing is displayed. resim resim If I clear the export fields, save the scene, and then reopen the scene in VSCode, everything is fine! resim resim I tried it on a brand new project with default settings containing only one scene and one script and found the same problem.

Steps to reproduce

Create and save a new scene Attach it a script with export fields Assign references in the editor Save the scene and check the Scene Preview Clear the export fields on the scene and save it Close the scene and reopen it on VSCode

The scene preview in VSCode should display all the nodes and assigned resources correctly, regardless of whether export fields are filled. But the scene preview in VSCode is empty or does not display the expected content when export fields are filled.

23Chromosomes commented 1 month ago

Same issue.

DaelonSuzuka commented 3 weeks ago

I can't replicate this on either the extension's master branch, or with the published version v2.0.0 installed from the VSCode marketplace.

@StalOlympus @23Chromosomes can either of you create a minimal project that demonstrates the problem?

Jimskie101 commented 2 weeks ago

Same Issue. Here's a test project from version Godot Mono 4.2.1

GodotToolsScenePreview.zip

No attached Exports image image

With attached Exports image image

DaelonSuzuka commented 2 weeks ago

Thanks, @Jimskie101, I'll check this out.

DaelonSuzuka commented 2 weeks ago

I believe this issue was fixed in PR #603, because the problematic scene opens correctly with the current master branch.

image

The issue was actually the node_paths attribute in the [node] section header, and not the exported field itself.

I'm trying to wrap up some open issues and get a new extension version published sometime in the next week.