Skip to content
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

Opening a currently preloaded scene will remove paths from sub-resources #72854

Closed
Tracked by #85081
KoBeWi opened this issue Feb 7, 2023 · 2 comments · Fixed by #80281
Closed
Tracked by #85081

Opening a currently preloaded scene will remove paths from sub-resources #72854

KoBeWi opened this issue Feb 7, 2023 · 2 comments · Fixed by #80281

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Feb 7, 2023

Godot version

4.0 a05670c

System information

Windows 10 x64

Issue description

Follow-up to #72257
The PR fixed only half of the issue. Sub-resource IDs are no longer lost, but paths still are. When a scene is preloaded in a currently opened script, opening that scene will result in all sub-resources having empty paths until you save it. While it's harmless in most cases, it's a major pain for built-in scripts, because they appear as [unsaved] in the script editor (which leads to further issues, like not being closed on scene close or not being able to open multiple scripts).

godot.windows.editor.dev.x86_64_XCY1o59Wgj.mp4

As identified in #72257 (comment), the issue is caused by preload() using resource cache in a wrong way. This needs a GDScript fix (and #72257 can be then reverted).

Steps to reproduce

  1. Create a scene
  2. Close it
  3. Preload it in a script
  4. Open again

Minimal reproduction project

PreloadBug.zip

@KoBeWi
Copy link
Member Author

KoBeWi commented Jun 2, 2023

Further issues with affected built-in scripts include not being able to use breakpoints and not being able to pin-point errors (their source shows as something like GDScript:-143434353, which is the default Object string that displays id). Which means the issue also exists at runtime and is even worse.

@dalexeev
Copy link
Member

dalexeev commented Aug 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants