I'm using a scene as a base for other scenes which inherit everything from it (including a GDScript). That all works well. But in one of the inherited scenes, I converted a script from the base scene to an extended script (right click on the node with the script -> extend script), thinking I'll be adding some code there.

But now I realized I actually don't want to modify that script and want to leave it like it was. I know I can detach the script or to clear inheritance etc but what I actually want to do is to just revert the script back to simply follow everything from the base scene.

Is there a way to revert an "extended" GDScript back to a "regular inherited" GDScript?

  • xyz replied to this.

    guduq Re-attach the same script that's attached in the base scene.

      xyz I tried that already, but then all the signals from the original script get broken. And Godot then treats the original script as a "new script" (edit: to clarify, Godot does not realize it's the original script and just act it as if the original inherited script were substituted with "something"), so it's also possible there'd be some problems down the line if I edit it (for example maybe it won't get updated properly on this particular scene).

      • Toxe replied to this.

        guduq You could try closing Godot and then carefully edit your .tscn file in a text editor.

        In the end I just deleted the whole scene and recreated it from scratch. Blah… But ok at least now everything works.