godot icon indicating copy to clipboard operation
godot copied to clipboard

Deleting a GDScript doesn't detach it

Open CitrusWire opened this issue 5 years ago • 2 comments

Godot version: 3.2.3

Issue description: In the editor, deleting a GDScript file using the FileSystem panel doesn't remove it from the file in the Scene view.

Steps to reproduce:

  1. Add any node
  2. Attach a script to it
  3. FileSystem panel -> Right click on the script you just created (i.e. Node.gd) -> Delete
  4. Confirm "Remove".

There is still a script attached to the node in the scene.

Minimal reproduction project: See Repro steps.

CitrusWire avatar Oct 11 '20 12:10 CitrusWire

Is that reproducible with any kind of resource? (textures, models, styleboxes, materials, shaders, etc) Also I suspect it also doesnt remove it from non-open scenes?

Zylann avatar Oct 11 '20 17:10 Zylann

Greetings from Godot 4.3 - four years later and experiencing what appears to be the same bug. Started with a main.gd script attached to the Main node of project and after deciding to change to a MainScript.cs replacement and not finding any way to expunge main.gd attempted deleting it in the FileSystem yet still can't get rid of the file association - instead main node is associated with res://main.tscn::GDScript_2ejnh that contains the content of the former main.gd and am yet to find a way of assigning my cs code.

norlesh avatar Oct 01 '24 06:10 norlesh

Select the node and in the inspector, scroll all the way down until you find a small section for the script attached to the node. Select it and click on "Clear" and that should detach it from the node.

JayK320 avatar Nov 06 '24 19:11 JayK320