Which folders in a Unity project are critical folders?

Dropbox has recently started Selective Sync, which means you can disable certain folders from syncing automatically over the network. Since Unity compiles all assets locally, and since these assets aren't critical (i.e. if you delete them, Unity will just recompile them), I wanted to know something:

Which folders inside a Unity Project heirarchy are non-crucial, meaning, if they are deleted or corrupt or incorrect, Unity will just re-compile them? Here is the typical folder structure I have inside my project folder:

|- [asset list]
|- cache
|- metadata
|- ScriptAssemblies
|- Debug
|- bin

So which of these folders, if deleted (or not synced, in this case), would not "break" the project?

As of (at least) Unity 5 Personal (aka the free version), you no longer need to back up anything from the Library folder. Everything in Library can now be safely ignored. The obj and temp directories can be ignored, as before. Project Settings and Assets folders should be checked in. See step #8 at docs.unity3d.

(I have a Recovered Assets folder, but I’m not sure what that’s for. Nothing there has changed in a while, though.)

The only one you need if you have external version control enabled is Assets

Without that, you can get away with Assets, Library/cache and Library/metadata

I use Dropbox for some of my personal projects too, but make sure you are also using version control. I lost a whole project once because Dropbox got all confused during an auto-sync, and destroyed multiple random files within the project. I believe this happened because unity needs to create/adjust a considerable amount of files while you are actively working.

Now, when I work on a unity project that is stored in my Dropbox, I turn off the synchronization by selecting ‘Pause Sync’ while I am working. And when I’m done, I let it resume and catch itself up cleanly. And… I use SVN on top of it all now. :wink:

I’m using the following .gitignore file:

# ---------------[ Unity generated ]------------------ #
    # ----[ Visual Studio / MonoDevelop generated ]------- #
    # Unity3D Crash Reports
    # -------------[ OS generated ]------------------------ #
    # include meta files
    # Builds