I have managed to recover the following files, including the scripts, from a previous build. However I still have lost all the images which took a long time to make.
Bummer , You can always try file recovery software , should be some free ones for mac. Can’t stress enough the importance of version control. Bitbucket , github etc.
Cut files are placed in a temporary directory named asset-cut in your systems Temp folder. Unfortunately, this directory is deleted when you shut down the editor.
I’m really sorry this happened to you. I wonder if it might have something to do with the fact that there’s a colon (:) character in your project’s directory name? It seems to cause trouble on Windows & macOS (specifically Finder) at least. I would definitely consider renaming your project directory to avoid issues in the future.
Also, while I’m in here - I would strongly recommend using a version control system such as Git for your game project. Even if you don’t intend to host your project on GitHub or something similar, it lets you roll back the state or your project to the last time you made a commit.
We try very hard to not cause any data loss for our users when developing the editor, but it is not impossible that we could push an update that would strip some information out of your files by mistake. If your project is under version control, you have a safety-net of sorts, should that unfortunate event happen.
Of course, we would push a fix immediately if it happened, but you don’t want to be the guy that found and reported such an issue after it messed up your project without any way to restore it.
I was suspicious about this colon as well so tried to make a folder on my mac with one in it. The mac refused to create it. I then tried to add a new folder with a colon in the editor, Defold spotted this, too: my folder test:folder was simply renamed to testfolder.
Cut files are placed in a temporary directory named asset-cut in your systems Temp folder. Unfortunately, this directory is deleted when you shut down the editor
I will remember this next time. useful information.
I was suspicious about this colon as well so tried to make a folder on my mac with one in it. The mac refused to create it. I then tried to add a new folder with a colon in the editor, Defold spotted this, too: my folder test:folder was simply renamed to testfolder.
the file itself is called hold/trigger. I believe Defold renamed it to hold:trigger. I have now changed it to hold trigger (no punctuation).
I have not had this problem before even with this file name. I will see if the problem persists now I have changed the name.
Just reporting back on this: after experiencing the problem several times, I changed the file name removing the / and now the problem has disappeared. Thanks all for your help.
Interestingly, at least on my mac, when trying to create a file or folder in the editor with the delimiters “:” or “/,” Defold does not allow this and simply removes this char, so test:file becomes testfile.
But it does not remove this problematic character when the file is copied into the project folder. A file with a slash ends up as a file with a colon, so test/file becomes test:file.
Mac OS does not allow naming a file or folder with a colon in it, let alone paste it somewhere. I assume this is similar on Windows or Linux.
So, as Josh found out, files with a delimiter in the name can spell trouble.
Would be possible to automatically rename those problematic files copied into the folder structure as well or alert folks that their name contains an illegal character?
would be possible, maybe also could be possible to rename the animations in atlases, when you rename the pngs in the explorer? Whenever I change a png in the explorer, the atlases are always broken and I need to reimport them. I wish they could stay in the atlas, but the name of the animation just follows the name of the file, if it was changed. It could be difficult, but perhaps - possible?