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
Missing dependencies after renaming a placeholder scene #37818
Comments
Still happens on latest beta 3.2.2, but it can be fixed manually by editing the tscn file.
This probably happens because the dependencies for placeholders are linked in a different way to regular instances, they are not linked at the top of the file, they are in-line at the node location. The easiest way to fix this would be to go through "all" the nodes in the tscn file and check if they are a placeholder, which would not involve changing the way placeholders are saved. Another way would be to list the placeholder dependencies at the top of the file as well so they can be found more easily. |
Same underlying issue: #44720 |
still not working |
Can confirm still an issue in 3.5 RC 5. If you mark an node as placeholder using the context menu, save the scene, close it and then move the referenced node using the FileSystem tab the reference is not updated and thus the scene file can't be opened in the editor anymore and the tscn file needs to be manually fixed using a text editor. |
Happened to me Godot 4 Beta 6. I had an instanciated scene in a currently unsaved scene, i renamed the instantiated scene in the filesystem and when i went to save the current scene i had this error. Not sure if it's an issue and Godot should update my instantiated scene or not, i wasn't able to "Open in editor" as it didn't find it obviously. I removed the instantiated scene and added it back., solved. |
Have this issue in Godot 4.0 stable as well. It would be nice to be able to fix the scene inside godot somehow instead of search/replace in some text editor. I get that the whole purpose of "instance as placeholder" is that the scene being referenced is not an "external resource" anymore and won't be loaded by default, but maybe there could be a check in the editor specific for placeholders, and at least give a better error message instead of a generic "Scene file 'scene_path.tscn' appears to be invalid/corrupt". Just reporting the line in which the tscn found the invalid/corrupt error would already help, but if we could have a message more targeted to placholder scene paths being outdated or even a window to "fix placeholder dependencies" similar to the one that fixes the normal external resources would be great! |
If the point of "Instance as Placeholder" is that it is not referenced as a external resource then maybe the solution would be to simply not fail loading the scene when the placeholder references a non-existent resource. Then there would have to be a way to change the path. Though this might open a can of worms of having to deal with both valid and invalid placeholders and it might just be simpler to fix references the same way external resources are already handled. |
My attempt to address this issue can be found here: https://github.com/Flavelius/godot/tree/fix_placeholders It changes the way renaming dependencies currently accesses skipped file content (binary blob -> text) so it might be a little slower to execute on many files. But every other way i see also just involves parsing the whole file in a similar way as placeholder paths are not ext_resources, so cannot be short-circuit-ed out. If that's enough and works for typical usecases though, i can create a pullrequest for it. |
Just ran into this issue on Godot 4.2.1-stable. |
I've run into this issue with 4.2.1-stable as well. The difference being that it happened out of nowhere when opening a project that was just fine earlier that day |
Godot version:
OS/device including version: macOS Catalina 10.15.4
Issue description:
Renaming / drag & dropping a scene to another folder may cause missing dependencies if the scene is marked "Load as Placeholder".
instance_placeholder="res://XXX.tscn"
field in thetscn
file.Steps to reproduce:
Minimal reproduction project: N/A
The text was updated successfully, but these errors were encountered: