1

So earlier on I was attempting to code basic scripts on Godot and I may have deleted a Button.gd source code, so far the output is perfectly fine but the debugger displays an error even after making a new scene entirely. I'd like to try and recover the Button.gd source code or maybe even find a way to stop the error from appearing. If anyone knows how and where to access Godot's recycling/trash bin I'd appreciate the help!

https://i.stack.imgur.com/qrlk7.png

Sammy
  • 23
  • 4
  • Godot will try to access the system recycle bin. Only if Godot cannot find a recycle bin, it might attempt to create one. So, look in the OS recycle bin, if you have any. Otherwise, what operating system are you using? So we can guess where Godot may attempt to create one. – Theraot Dec 09 '21 at 17:37
  • oh! I use Windows 10- I looked into the recycling bin but I was unable to spot the source code, unfortunately. – Sammy Dec 10 '21 at 05:27
  • On Windows Godot will use the windows API for this, and will not attempt to make a recycle bin. If you manipulated the files out of Godot perhaps you renamed or move the file in such way that Godot does not find it. I suppose file recovery software could work to get it back too. I'll point out that version control software would allow you to revert changes, if you were using any, of course. – Theraot Dec 10 '21 at 15:47
  • I do recall just moving the source code to trash from within the software itself, so far I've continued working on the code and i don't seem to get the error for it anymore- I'll for sure keep in mind the things discussed however! – Sammy Dec 10 '21 at 16:50
  • [Also! I just checked and apparently I cant mark my question as solved unless you reply to this in an answer- Do you mind doing so? :)] – Sammy Dec 10 '21 at 16:57

1 Answers1

0

When deleting files from Godot, it will try to send them to system recycle bin.

On Windows and OSX Godot will use the system API to delete files. And Godot will not try to create a recycle bin.

On Linux (or if you build Godot for other unix or bsd based systems) when Godot does not find a recycle bin, it might attempt to create one. Where the files will end depends on the particular system/distro.

As far as I can tell, if you delete files in the web version of Godot, they are gone.


If your files are missing, and you cannot find them in any recycle bin, it is possible that recovery software (such as Piriform Recuva or EasUs data recovery) could be able to get them back.

I'll also point out that if you were using version control software (such as git or mercurial), it would allow you to revert changes.

Theraot
  • 31,890
  • 5
  • 57
  • 86