Dropbox not playing nice with Unity- suggestions?
Hey everyone,
I've been using dropbox to back up my Unity project/files, and for the most part it's been working pretty well, but I often get weird errors when editing or loading the project, i.e., internal compiler errors, failure to load files or presets, etc. At first I thought this might be my computer doing something weird, but after some digging I realized that these errors were being caused by dropbox syncing files while Unity was trying to access them. For the most part these have been easy to fix, just a matter of reloading the file in question or at worst restarting Unity, but today I tried to open a scene only to find that it had been corrupted (completely empty, no objects in the hierarchy), with an "iterator == end'" error in the console. Fortunately I had a recent version of the scene file that I could revert to without losing much work, but I want to make sure this doesn't happen again, and I'm 99% sure dropbox was the culprit. I could switch to Google Drive or something similar, but I imagine these same errors could occur with any software that syncs files or folders in real-time. I want to make sure that I have online backups of my files, but I want to make sure these sorts of errors don't happen- I'm curious if anybody out there has encountered this situation before, or has suggestions for alternative backup solutions that aren't as intrusive. Thanks guys!
Answer by jrocamora · Oct 10, 2016 at 12:06 AM
Most effective solutions:
1) Use a physical hard-drive as a failsafe backup, never hurts.
2) Properly backup, having realtime cloud sync isn't good practice. If you mess something up past the point of undo, you have nothing to fall back on. Instead, make a copy of your entire project, and name it with the date and time you made the backup.
3) Instead of running your Unity project out of the realtime syncing folder, have a folder that only exists where you will work on the current version of your project.
4) Back up the current version folder from #3 to your backup locations every time you close Unity.
5) Instead of uploading the basic folders to the cloud, zip the whole thing beforehand. That way, the service will see the project as a single file, and will reduce the chances of things going wrong because of a sync error.
6) Of course, if you have a good backup structure, you will find it becomes very hard to lose any work if you maintain good backup practices.
Thanks for the answer! I'll create a separate folder outside of the realtime one where I do all my work. Also, I never thought about uploading a zip file, that's a really good suggestion!
@achand004 Please post comments as comments and answers as answers. I'll convert this answer to a comment this time.
I guess this is a good answer if someone really wants to use some cloud drive service for backing up their project.
But I really think it should be mentioned that there are actual services/applications that are meant for this purpose.
Version control softwares and free services like github or bitbucket are much better suited for this and won't mess up your Unity project
Your answer
Follow this Question
Related Questions
Using a script to auto sort file hierarchy causes error CS2001 0 Answers
The requested operation requires elevation 0 Answers
File.Move won't work : IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path: 0 Answers
Mob.opponent' is a `field' but a `type' was expected help please! :) 1 Answer
ERROR CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `TriggerSphere' 1 Answer