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

How to reduce size of metadata? Ours is 7gb

Discussion in 'Unity Collaborate' started by MrLucid72, Jun 2, 2017.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    754
    We're trying to reduce the size of our project, but the metadata still seems high -- 7gb, actually! Haha oops.

    We're experiencing some weird issues that we think may be because our project/meta data size is too high, so we're on a diet.

    How can we accomplish this? Thanks~

    (PS - I don't believe tags work in this subforum)
     
  2. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,628
    Sadly there isn't a whole lot that can be done to reduce the size of your metadata (assuming you're referring to the metadata in your Library folder).

    You could try deleting any unused assets from your project. And if you have a lot of textures in your project than you can try compressing them smaller. I hope that either of those options help.
     
  3. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    754
    Thanks, @ryanc-unity ! We recently slimmed our project down from ~22gb to ~13gb, whew! That was tough as a RL diet (although faster).

    When I delete an asset, will the meta files delete themselves if their "twin" is deleted? If so, Immediately or after a Unity restart? Or do I need to manually delete them?

    I'm going to assume that meta files are only for use with collab? Is that right?

    If I ever decided to disable collab, would the meta files poof on their own? Mostly trying to determine the use of these -- I'm going to guess they're sort of like GitHub "local commit" equiv... because suddenly I only have 24mb worth of them after I recently pulled, so it seems like the meta files slimmed itself down after I stopped working on things.

    Thanks again! Apologies for so many questions. We're super determined to slim down even more.
     
  4. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,628
    No worries about the tons of questions.

    The meta files will delete themselves when their associated asset is deleted and Unity gets focus. Unity will see that the asset is gone and delete the meta file for it if it was left behind. Deleting the asset within Unity deletes the meta file with it.

    Meta files are used for all source control options. It makes it possible to upload your source without having to include your large Library folder since that can be rebuilt as long as the meta files are included with the source. If you decide to not use Collab or any other source control then you can choose to have Hidden Meta Files by going to Project Settings->Editor->Version Control Mode.

    If you do decide to disable Collab then the meta files will still remain. But you can easily remove them all by going to the above mentioned setting.
     
    MrLucid72 likes this.
  5. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,240
    I start making my project in Unity 2017 imported slowly along years up to 2019.4LTS

    I presume there is a bug.
    Because my "Assets" folder is just 22 Mb but my "Library" is half a Giga!!

    I'm trying to reduce the size of the 150Mb Metadata folder (also Artifacts 123Mb, PlayerDataCache 154Mb) and Libary content in general.
     
    Last edited: Jul 21, 2020
  6. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,628
    Hi @AlanMattano, if your Library folder feels too large and has built up a large cache over the course of your project, then there is a way to reset it. The Library folder can be recompiled as long as the Assets, Packages, and ProjectSettings folders are left intact. So try closing your project, moving your Library folder somewhere outside of your project's directory, then reopening your project and waiting for it to recompile the Library folder from scratch. Afterwards, the Library folder should be a lot smaller.
     
  7. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,240
    Haaa perfect!

    Liberty folder now is 500Mb and Assets is 180Mb. Is that normal?
     
    ryanc-unity likes this.
  8. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,628
    Yes, that's normal. :)
     
    AlanMattano likes this.
unityunity