Yesterday I encountered a dependency bug. I was downloading something large at the time so I deleted the file I was downloading and rebooted godot. The dependency error was gone but some of my code disappeared. When I try to load the subscene it says “Error while loading file” and the output tells me
“Failed loading resource: res://Sub Scenes/Militia.tscn. Make sure resources have been imported by opening the project in the editor at least once.”
an old forum told me to open one of the tscn in text and that it’s probably missing a bracket on the first line. I checked everything and they seems fine.
I don’t think this is a circular dependency problem since the subscene wasn’t referenced anywhere.
May I ask how large this file is? Parsing errors are usually caused by saving a large file. The solution is to manually edit the file and delete unnecessary data from it
My game is pretty small at the moment. The file I tried to download was totally unrelated with Godot, but it was large enough to take out most if not all of my storage. I opened Godot before I deleted the file so that’s when the dependency error popped up.
go find the .tscn file in your computer, it should be in the folder of your godot project. right click it, open in notepad, copy and paste the text here. There’s also a button to upload files to this website too
Yea I tried this last time, most of my tscns that was affected doesn’t have anything on the notepad. For the scene that I was able to open (though it’s still missing the script and some assets), I checked the notepad for it and it looked fine, but I can still send it if you need me to.
It sounds like more than one file has been deleted, if you know which files you may be able to remove the offending lines with a text editor, but you will face some amount of data loss.
If you want to upload your project folder somewhere I’d be happy to lend a helping hand recovering scene and resource files this way.
Try looking into a version control system, like git to prevent redundant data loss next time.