Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Mecurial Ignore for what files in Unity 4.2

Discussion in 'Formats & External Tools' started by vinfang, Aug 27, 2013.

  1. vinfang

    vinfang

    Joined:
    Jul 13, 2013
    Posts:
    14
    I've done some google searching and followed these tutorials http://mobile.tutsplus.com/tutorials/game-engine/using-version-control-with-unity3d/ and another website I can't find that pretty much said you can ignore all the folders except the Assets folder.

    So downloading the latest version Unity 4.2 and downloading the tutorial project Stealth, the folder directory structure for the stealth project looks like this

    StealthTest
    StealthTest/Assets
    StealthTest/Library
    StealthTest/ProjectSettings
    StealthTest/Temp <- This one disappears if you shut down Unity

    I did some testing and keeping the Assets folder while deleting everything seems to work, but the Prefabs folder in the Assets no longer displays correctly when I start up Unity. The prefabs are still there, but no image of the env_stealth_static shows up in the preview or when I drag it to the scene.

    With more testing done, it seems that you can delete Project Settings folder fine as it will be regenerated correctly, but the Library folder is a bit more complicated.

    In the Library folder, deleting the ScriptAssembilies and metadata folders seems to be ok as Unity will regenerate them and the Prefabs stay in tact despite the fact the preview remains a blue box now in the file icons, but show up fine in the preview window. But if I delete all of the Library folder, you get problems with the prefab.

    The bottom line is what is safe to ignore and what is critical for the unity project to be recreated correctly with almost everything in tact? Or what did I do wrong if the Assets folder is really the only thing you need?
     
  2. Giometric

    Giometric

    Joined:
    Dec 20, 2011
    Posts:
    170
    You should ignore the Library folder entirely, and the Temp folder as well (in case you want to commit while Unity is running); the Assets and ProjectSettings are the only folders you should keep. Just make sure that, in your project's Editor settings, you have .meta files enabled. To get to that go to Edit > Project Settings > Editor, and look in the Version Control section.
     
  3. vinfang

    vinfang

    Joined:
    Jul 13, 2013
    Posts:
    14
    Thanks for the answer Gio, after more testing everything seems to be preserved correctly as you stated if I keep the Assets and ProjectSettings folder. However, I do find that I need to sometimes do the re-import all assets to fix the thumbnail preview issue on my assets but other than that no problems.
     
unityunity