- Home /
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:
Assets |- [asset list] Library |- cache |- metadata |- ScriptAssemblies obj |- Debug Temp |- bin
So which of these folders, if deleted (or not synced, in this case), would not "break" the project?
Answer by Mike 3 · Jun 29, 2010 at 10:08 PM
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
Just thought i'd mention I've seen some odd behaviour after removing the 'Previews' folder in Unity 3.3. I have a metaballs implementation and it would run slightly jerky after deleting the preview folder. This didn't show up in my fps counter or the stats, but visually it was definitely more jerky, until I quit and reloaded Unity. If it rebuilt the preview folder then it was smooth. Not sure I understand what is going on, but it may be something to watch out for.
You'll also need ProjectSettings folder if you have custom physics, tags or any other settings set up from Edit -> Project Settings
I've wrote post about that
Answer by Archony · Apr 11, 2015 at 08:42 AM
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.)
I guess the Unity version that is used in a project is also saved in the Library folder. I also ignore Library folder but I had a case that I couldn't find out the Unity version of a project that was passed to me through Source Control.
Answer by cgiguy · Mar 12, 2012 at 05:06 PM
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. ;)
Answer by U_Ku_Shu · Aug 05, 2016 at 05:22 PM
I'm using the following .gitignore file:
# ---------------[ Unity generated ]------------------ #
**/[Ll]ibrary/*
**/[Tt]emp/*
**/[Oo]bj/*
**/[Bb]uild/*
**/[Bb]uilds/*
**/UnityGenerated/*
**/Assets/AssetStoreTools*
# ----[ Visual Studio / MonoDevelop generated ]------- #
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.pidb.meta
*.booproj
*.svd
# Unity3D Crash Reports
sysinfo.txt
# -------------[ OS generated ]------------------------ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
ios
ios.app
# include meta files
!*.*.meta
# Builds
*.apk
*.unitypackage
Your answer
Follow this Question
Related Questions
Lock Folder in Project View 3 Answers
New Project: Can't change startup folder 3 Answers
Unity Folder way too big - bigger than inside Files 1 Answer
Merging Project Folders on the desktop? 0 Answers