Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Library

Discussion in 'Documentation' started by vamosfa, Jun 23, 2020.

  1. vamosfa

    vamosfa

    Joined:
    May 15, 2016
    Posts:
    30
    Hi all mates devs!

    I do not find a lot of information about this topic. I read the few documentation available about the folder structure of Unity Projects https://learn.unity.com/tutorial/project-architecture-unity-project-folder-structure?language=en# but there is no more than a pair of lines per folder description.

    I want to know if I can delete the Library folder of my project without broking anything, as its size is 25GB and my project is getting insanely heavy, and I spend hours each time I copy the project into a new security copy.

    I appreciate any explanation or help about the consequences of deleting the Library folder.
    upload_2020-6-23_11-16-44.png
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    5,450
    Next time please choose an appropriate forum for your questions, like Editor or even Scripting. Documentation is strictly for documentation.

    About your problem. You can leave out the content of the Library folder from backups and from version control systems.
    I do not recommend to actually delete this folder or the contents unless it is absolutely necessary. If you remove the contents of this folder, at the next start Unity will reimport all of your assets. And it can take a while.
    Obviously if you have emergency backup and you need it, it is not a big problem, but to delete the contents of the folder just because it is big is a bad idea. (There are some instances when it can help with some bugs as a workaround, but in general, no).
     
  3. vamosfa

    vamosfa

    Joined:
    May 15, 2016
    Posts:
    30
    Thanks for replying.
    I search on all forums available and I posted here as I really was looking for information about Library documentation, I do not know why it is so hard to find information in official docs like the one that you explain here.
    Apart from possible new replies, I guess I will keep the data into this folder as it would be a pain to load all assets again.
     
  4. Disrop

    Disrop

    Joined:
    Jun 18, 2020
    Posts:
    6
    I think this is done for some specific purpose, apparently, Microsoft doesn't want you to have access to this information
     
  5. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    5,450
    Officially you are not supposed to change anything on the OS file system level in your project. This is clearly stated in the documentation. That's why you don't find anything that inspires you to do that. Changing, deleting anything in any project folder can cause data loss and/or project corruption.
    We, on these forums sometimes advise to do it when the problem can be solved this way, but this doesn't mean it is officially supported way to do so.
     
  6. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,942
    Yes. The library is just there to contain all the data Unity's calculated about your project. It can always be recalculated from your Assets folder.

    Deleting the library is essentially the same as right-clicking in your project view and selecting "reimport all".

    You should check if the time it takes for Unity to rebuild the library is as long as the time it takes you to copy it from one location to another.
     
unityunity