Which Unity project files can be ignored for version control?

Which files / directories in a unity project can be safely ignored when checking into version control (SVN / GIT)?

Temp/

/Library/cache/

The answers here seem to be outdated, so here’s an update I guess:


  1. In the menu, go to Edit > Project Settings > Editor
  2. In the inspector, change Version Control Mode to “Visible Meta Files”
  3. Change Asset Serialization Mode to Force Text

This will ensure that all your metadata is stored in local metadata files, instead of in your Library folder. At this point, the Library folder becomes unnecessary to keep synced between users.

Now you can ignore these files in your preferred version control, including the entire Library folder:

### Directories ###
[Ll]ibrary
emp
    [Oo]bj
    [Bb]uild
    [Bb]uilds

    ### Autogenerated ###
    sysinfo.txt
    .hg
    .git
    .vs
    *.csproj
    *.unityproj
    *.sln
    *.suo
    *.user
    *.userprefs
    *.pidb
    *.booproj
    *.DS_store

(note: this is an svn:ignore list, but will need to be formatted to work with other version control systems)

This is the ignore list we had for 2.6:

($PROJDIR refers to the top level project directory)

$PROJDIR

obj

Temp

*.suo

*.user

$PROJDIR/Library

cache

metadata

ScriptAssemblies

assetDatabase3

assetservercachev3

AssetServerCacheV3

AssetVersioning.db

expandedItems

FailedAssetImports.txt

guidmapper

ScriptMapper

unity default resources

unity editor resources

And now for Unity 3.0, we use these ignores:

$PROJDIR

obj

Temp

*.suo

*.user

*.pidb

*.userprefs

$PROJDIR/Library

cache

metadata

previews

ScriptAssemblies

assetDatabase3

AssetImportState

assetservercachev3

AssetServerCacheV3

AssetVersioning.db

AudioManager.asset

BuildPlayer.prefs

BuildSettings.asset

DynamicsManager.asset

EditorSettings.asset

EditorUserBuildSettings.asset

expandedItems

FailedAssetImports.txt

guidmapper

InspectorExpandedItems.asset

MonoManager.asset

NetworkManager.asset

ScriptMapper

unity default resources

unity editor resources

In general the only folders you should keep under source control are Assets and ProjectSettings, other files and folder are generated.

You find more information about Unity and version control systems in my post http://developers.nravo.com/mastering-unity-project-folder-structure-level-0-vcs

Already asked, already answered:

http://answers.unity3d.com/questions/13992/which-folders-in-a-unity-project-are-critical-folders

Why can’t I according to the list below, add “InspectorExpandedItems.asset” to the ignore list?

http://unity3d.com/support/documentation/Manual/ExternalVersionControlSystemSupport.html

thanks

Just Include the entire Library folder!!

My mistake is I tried to ignore the files Lance mentioned above. But not having those files has broken my project, and all links to textures, mesh, materials, prefabs and scripts.