Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
21
Question by Hawkeye · Jul 16, 2010 at 10:02 PM · source-control

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/

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

6 Replies

· Add your reply
  • Sort: 
avatar image
12
Best Answer

Answer by Lance Sun · Jul 17, 2010 at 02:37 AM

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

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bach · Oct 13, 2010 at 02:02 PM 0
Share

Hi Lance, but leaving out these file in the Library has broken the linkages and references to textures, mesh, materials, scripts and prefabs! I think the entire Library folder should be included although Unity docs says don't! I just removed all files lin lib except the ones mentioned in the doc http://unity3d.com/support/documentation/$$anonymous$$anual/ExternalVersionControlSystemSupport.html

And that broke all links!

avatar image Lance Sun · Oct 27, 2010 at 05:54 PM 2
Share

@Bach Have you enabled external version control? Without it enabled, it will break everything as you've described.

avatar image sosh · Nov 25, 2014 at 12:37 PM 0
Share

@Lance Sun - how do you do that?

avatar image
36

Answer by tonycoculuzzi · Aug 30, 2013 at 02:30 PM

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
 [Tt]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)

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DrFranklin · Jan 25, 2014 at 02:38 PM 0
Share

That fixed all my broken references indeed after synching to another machine through git.

avatar image schmosef · Apr 17, 2014 at 02:25 PM 1
Share

Thanks for this!

avatar image Fattie · Nov 06, 2014 at 05:48 PM 0
Share

Great explanation. Similar from unity (but not as well explained as Our Tonzie :) ) Good one. http://unity3d.com/learn/tutorials/modules/beginner/architecture/folders-in-version-control

avatar image 11011001 · Dec 19, 2014 at 03:15 PM 6
Share

GitHub maintains a Unity .gitignore template as part of a larger collection of .gitingore templates for a variety of languages and development environments. Follow Fonzie's above steps to force asset serialization as text and then create a .gitignore with the contents of the Unity .gitignore template.

avatar image nickg111 11011001 · Nov 02, 2017 at 11:09 PM 0
Share

@11011001 - that should be the accepted answer!

avatar image Kjbrennan 11011001 · Jan 06, 2018 at 04:05 PM 0
Share

Saviors the both of you!

avatar image fadden · Mar 09, 2015 at 08:21 PM 0
Share

cf. External Version Control System Support.

avatar image
5

Answer by vzasadnyy · Feb 12, 2014 at 11:58 AM

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

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Graham-Dunnett ♦♦ · Feb 12, 2014 at 11:58 AM 0
Share

Nice one!

avatar image FerventZinder · Feb 25, 2014 at 01:19 AM 0
Share

Nice, step by step with images

avatar image Ricna · Aug 28, 2017 at 06:27 PM 0
Share

Great! Nice job!

avatar image
-10

Answer by Bach · Oct 13, 2010 at 02:12 PM

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Lance Sun · Oct 27, 2010 at 05:55 PM 0
Share

Have you enabled external version control? Without it enabled, it will break everything as you've described.

avatar image Kristen 1 · Oct 28, 2010 at 09:05 AM 0
Share

Lance, could you please indicate how to enable external version control? I thought it would be under Edit > Project Settings > Editor from what I've read elsewhere, but Editor is not there.

avatar image Lance Sun · Nov 13, 2010 at 05:57 PM 0
Share

um... it is under Edit > Project Settings > Editor. I'm not sure why it is not there for you. You're looking in the Edit menu right?

avatar image cregox · Oct 24, 2011 at 04:13 PM 1
Share

@$$anonymous$$risten Only Unity Pro has External Version Control

avatar image
0

Answer by qJake · Jul 16, 2010 at 10:43 PM

Already asked, already answered:

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

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Lance Sun · Jul 17, 2010 at 01:25 AM 1
Share

that other question is only asking about folder. Hawkeye is asking about files too. The Library folder requires file-by-file ignores.

  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

14 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity and source control (sourcetree) 2 Answers

Can Mecurial be used with Unity3d 3.1 2 Answers

Collaborate wants to push changes on many files I didn't edit 0 Answers

MonoDevelop doesn't load all source control folders 0 Answers

Array of objects on a MonoBehaviour script not persisting after pulling from source control 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges