Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Library/cache directory

Discussion in 'Editor & General Support' started by Arges, Oct 12, 2008.

  1. Arges

    Arges

    Joined:
    Oct 5, 2008
    Posts:
    359
    Hi,

    Unity keeps a Library/cache directory under the project, which seems to store textures among other things. Is this directory vital? Can it be easily regenerated if removed?

    Thanks!
     
  2. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Your project is a combination of the Assets and Library folder. Loose one and you're in trouble.
     
    dogzerx2 likes this.
  3. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Unity uses those folders (Library and Temp) to store data about your project and how/where things are being used. If you go and modify anything in there you then break Unity's "knowledge chain" and as such your project will quite likely begin to misbehave. So do NOT touch the contents of those folders else you shall incur much pain and project breakage. :)

    Note: after quitting Unity, or after opening another project, you can safely delete the Temp folder if desired but in general it's best to let Unity handle the clean-up process to avoid any hiccups.
     
  4. Arges

    Arges

    Joined:
    Oct 5, 2008
    Posts:
    359
    I see. So is there no way to regenerate the cache directory from within Unity if removed? I ask because I like using git for version control, and most (if not all) of the stuff stored there are binary files, so it makes it impossible to have branches and merge them afterward.
     
  5. pixelthis

    pixelthis

    Joined:
    Nov 5, 2008
    Posts:
    120
    Dragging up an old post :)

    I'm interested in this myself. I use SVN, and was wondering if I can leave these folders out of the repo. I guess I need all the files under Library/cache ?
     
  6. Arges

    Arges

    Joined:
    Oct 5, 2008
    Posts:
    359
  7. pixelthis

    pixelthis

    Joined:
    Nov 5, 2008
    Posts:
    120
    Thanks Arges - since I am using SVN basically as a backup at the moment and don't see any immediate need to merge, I think I should be ok.
     
  8. jesonzhong

    jesonzhong

    Joined:
    Jun 17, 2011
    Posts:
    15
    This directroy can be delete?
     
  9. jesonzhong

    jesonzhong

    Joined:
    Jun 17, 2011
    Posts:
    15
    I wrote a script to play 2d animation, I cut into a multi-frame images to animation playback, each frame of the picture size is about 30kb, but when I set its format after the truecolor image size becomes 600kb, pass into the error of the Texture collection!
    But in the pc will not run on an error, but the error will be output in ios! Even can not get into the game!
    What untiy 3d stored in a collection of things is limited in size?
    Thank you!
     
  10. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    561
    Isn't there a way to flush the caches/previews from the Library directory?
     
  11. appleunited

    appleunited

    Joined:
    Dec 25, 2010
    Posts:
    103
    Interested to know how the size of the cache folder can be reduced. It has become rather big for a small project. :confused:
     
  12. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Stop using assets that need to be converted and heavier post processed then the cache won't explode. use png, dds and fbx, do not touch PSD or Max / maya / c4d / blender etc that lead to reexport in the corresponding application
     
    DanVioletSagmiller likes this.
  13. appleunited

    appleunited

    Joined:
    Dec 25, 2010
    Posts:
    103
    So far, my image files are in PNG.. and model in FBX. The only thing I have included is the substance material.. Is that the cause?
     
  14. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    unlikely

    another thing that ramps extremely naturally are terrains ... at a 1024x1024++ heightmaps and detail maps they can easily account for 50-100mb per terrain depending on how much you do splatmap and object painting wise
     
  15. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    561
    Last edited: Nov 16, 2011
  16. Vitalii

    Vitalii

    Joined:
    Mar 2, 2012
    Posts:
    9
    My Library folder is about 1.5 Gb... any chances to decrease it's size?
     
  17. Irishsun530

    Irishsun530

    Joined:
    Jun 23, 2012
    Posts:
    13
    Hello,

    I just switched from a 2008 MBP running Lion to a MBP Retina running mountain lion. I have finally got everything to work (almost) on my new computer for my project except, the scripts. For some reason the scripts that I had for my first person shooter (tied in to the actual character) have "edited" themselves. The character was able to rotate instead of strafe, now it just strafes. Any idea where the tie in/path for scripts is located so I can fix it?

    Much Thanks!