this post was submitted on 01 Sep 2023
16 points (94.4% liked)

Godot

5925 readers
106 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 1 year ago
MODERATORS
 

Since I'm currently dealing with this problem, I'm gonna leave this info here, so anyone that comes across it knows what to do to fix it. Currently working on 4.1.1, should work on 3.x too

This is a problem that happens if you rename or delete files outside the Godot editor. Godot may warn you, or it may simply keep a cached copy and keep you completely unaware of it until you export the game and try to play it. It's always a good thing to check for these once in a while.

Related questions:

HOW TO FIX:

  • Create a dummy file, it can be a.PNG or whatever
  • Open the problematic scenes with a text editor
  • Change the path of the offending files to the dummy. They're usually at the top of the file, loaded as [ext_resource type="Texture" uid="" path=res://graphics/missing.png" id="10_0y2mn"
  • After saving, try to load the scene again. Be sure to run the Debug console version of Godot
  • If everything went well, it should open. Delete the dummy file from within the editor.

If that doesn't work, try this instead:

  • Open the problematic scenes with a text editor
  • Remove any lines that point to the offending files.
  • Run the Godot with the debug console
  • Attempt to open the scene in the editor. If it gives an error, check the debug console, the most likely error will be something like res://scenes/problemscene.tscn:3815 - Parse Error: Can't load cached ext-resource id: 10_0y2mn
  • Back in the text editor, look for that id within the scene. It'll likely be something similar to texture = ExtResource("10_0y2mn"). Delete it
  • Repeat the last 2 steps until the errors stop.
top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 year ago

if I get this error I just open the project in Visual Studio Code and remove the references manually. It's dangerous and requires a bit of knowledge of the tscn format.

[–] Feyter 1 points 1 year ago (1 children)

Why not removing the import and the reference in the problematic file directly once opened with text editor?

[–] ICastFist 2 points 1 year ago (1 children)

That's what I listed in the second part. Simply removing the references at the top without removing every attempt to load said resource will make the scene impossible to open

[–] Feyter 1 points 1 year ago

Ah yes. I think I oversaw it. Personally I think this is not a big deal but people not very familiar with editing config files in editors maybe are afraid of doing this.