I re-organized some nodes in my main scene (I created a new root node by shuffling around nodes manually). The game still ran after that.
This is the 'reshuffle' I'm describing that I did that is the precursor to my woes:
# initially:
Top2DNode/
└── Grunt
# after change:
TopControlNode/
└── Top2DNode
└── Grunt
So I then closed and re-opened the project, and on load, I am told the grunt.tscn is corrupted.
The error:
scene/resources/resource_format_text.cpp:284 -
res://scenes/grunt.tscn:225 - Parse Error:
Failed loading resource: res://scenes/grunt.tscn. Make sure resources have been imported by opening the project in the editor at least once.
That's not much to go on, except the line number 225:
So the scene error is on this line:
[ext_resource type="Script" path="res://scripts/grunt.gd" id="1_q4egi"]
...
[node name="Grunt" type="CharacterBody2D"]
scale = Vector2(2, 2)
collision_layer = 2
collision_mask = 2
script = ExtResource("1_q4egi") < THIS LINE IS #225
You would ask then, does the file res://scripts/grunt.gd exist? It does!
Let me explain some further debugging:
So I comment out the script = ExtResource("1_q4egi") , and at least the project loads again.
Then I add back the script manually, re-run the game; the script runs like it should. Everything seems fine.
... But then I reload the project, and boom, the grunt.tscn is corrupt again, and for the same reason.
So this issue is reproducible; attach a script to this scene, and the project will not reload successfully.
Does anyone have a suggestion here for me to try?