I delete a wrong file (player.script) of my project and i can’t use "undo " option, what i can do to recover it ?
- Take a big breath
- Have you synchronised your project to Defold servers recently? In that case you might have your file already in their git repository and then you would just be able to revert your deletion in the left bottom corner (find deleted file, click revert).
- Did you synchronise after you deleted the file? Then it becomes a little more complicated. It was such a long time since I worked within the Defold gitsystem itself so I believe others can be more helpful here.
It will sound harsh but this is the best(only) way to really learn to commit often and make sure that you backup in different ways. Hope it will get resolved.
/A
9 Likes
There is a small trick that can sometimes recover deleted scripts, if you did a ctrl B build after writing it. Just
- open build folder in your project folder.
- you’ll see a lot of folders, open the one which originally contained your script.
- you’ll then see your file, with a c attached to its extension, I.e. player.scriptc.
- open it using notepad.
- scroll down the rows of null written.
- a bit down, you’ll find your code, copy, paste and enjoy.
Note that this trick only works when you didn’t build the project after deleting the file.
7 Likes
thanks
1 Like