Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | headkase | |
Old Version | Published before Godot 3 was released. |
I accidentally attached a script to a sprite instead of its parent Node2D object so I couldn’t get access to the sprite node positions and such from that script. I know in the inspector that you can choose the script, set to none or such, but I ran into editor hell. In the filesystem I tried deleting the script, renaming it and reattaching it and lots of other stuff that didn’t work out well. Even to the point that when I switched to the scripts tab I would get a new script created “GDScript” and a number. Eventually I deleted the entire tree and recreated it without errors to begin with. It was just a test project so that was no big deal at all. However if I had a large project that would be a very bad situation to say the least.
So, for a newbie, how do you properly rename or delete scripts?
Did you try the Rename/Move and Delete options under the FileSystem tab?
duke_meister | 2016-05-29 08:25
I did try them again, I do not know what I did before but it all worked as you would expect when I tried it again. I am unable to reproduce the problem I had.
headkase | 2016-05-29 18:04
Yeah I think it’s common to go through this script hell when first using Godot, I know I did. Those built-in scripts are not explained anywhere and seem to cause lots of issues. Maybe that’s what happened to you, I don’t know. Best not to rename things outside of Godot though, if that was the case.
duke_meister | 2016-05-29 21:32
There’s a bug in there somewhere so a permalink for this discussion is (which links to the GitHub issue): Here.
headkase | 2016-05-29 23:08