Accidental deletion - undo?

I was trying to delete an uneeded script file and all my scripts disappeared. how do I undo this ?

If you have a published build, it is possible to get the ‘minified’ scripts and prettify them to reimport. It’s a manual process and you will lose your comments but it your code can be restored.

Luckily I did publish one. The scripts have been all accumulated into one file called:

  • __game-scripts.js
    which can be found inside the body under an iframe node
    At least they are not obfuscated.

HOWEVER - the problem seems to have occurred as I left the tab open in Chrome for a few hours and it became disconnected from the server. So selection of an unused file to delete, instead, selected the entire folder and all my scripts were gone. I’ve had this kind of “sync connection lost” problem before with attempting to add assets and they did not show up until I reloaded the 3 tabs (project, editor, launched)

I can understand how deletion in the scene graph of the editor is permanent but can you at least put the asset folder on the undo stack ??
If the suggested backup process is to fork your own project then I think it would be nice if you could add this important safety net to the tutorials or getting-started docs…

I was suicidal for a while after a weeks work disappeared unexpectedly…

Oh no. its changed all the variable names to single letters. Chances of me recovering the meaning is falling :frowning:

Please, please, consider adding some kind of safety net. We can’t all be organisations and some of us want the results to be opensource and freely available.

Hello, I’m really sorry about that.
Try this one -

I use it when get a problem with vars’ names.

1 Like

OK. took all day but I’m back to square one.
@mikefinch thanks for rthe tip. I’d forgotten about that place. Its nice it has a refactoring renaming option.
Helped a lot - thanks.
Guess I’m going to be forking my own project a lot more from now.