grokkaine
grokkaine

Reputation: 821

Scene reported as corrupt, usually when project is moved between PCs, though it only contains a script and no other nodes

My scene keeps becoming corrupt. It is related to the .godot directory, if I dele it and reload the problem goes away, but I would like to be able to work without constantly purging .godot for a single scene missbehaving. To overcome this, I codified all the scene contents into a script, so that I can easily delete it, create a new scene, attach the old script and make it work again. This is the scene contents, that is reported as corrupt:

[gd_scene load_steps=2 format=3 uid="uid://bmors317d8qlv"]

[ext_resource type="Script" path="res://agents/human/Human.gd" id="1_t4ac4"]

[node name="Human" type="Node"]
script = ExtResource("1_t4ac4")

I have no idea how to investigate this failure and Godot does not report any helpful message. Where can I check the uid match? What are those load steps and format about? I also cannot seem to reproduce the behaviour, but it seems to be related to me moving the project between a laptop and a PC. The scene is loading a 3D character and it is instanced in several copies inside the game.

Upvotes: 1

Views: 343

Answers (1)

Theraot
Theraot

Reputation: 40315

Where can I check the uid match?

Look in the file filesystem_cache8 located in .godot/editor/. You can open it with a text editor. Each line corresponds to a resource.

While the format of the lines is not documented (we could look in Godot source code for how it is generated and parsed), you should be able to search find which file corresponds with the uid by searching for the uid.


it seems to be related to me moving the project between a laptop and a PC

Is it running the same version of Godot?

If they are different versions they might be using a slightly different file format for the imported resources. So one Godot saves on one format, which the other tries to read as if it were a slightly different format, resulting in errors or incorrect behavior.

Upvotes: 1

Related Questions