Search Unity

Unity projects bigger on external SSD

Discussion in 'Editor & General Support' started by Jihaysse, Aug 28, 2021.

  1. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    53
    Hey everyone,

    I'm running into an issue: my unity projects are wayyy bigger on my external SSD than it should be.

    For example, I have a 50Gb project on my PC which turns into 484Gb on my external SSD (via USB)!
    Small 4-5GB turns into 50Gb projects too.

    I don't know where I can search for a solution. My 1 To drive is full with barely a few empty projects.

    Thank you very much!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    A large Unity project can have a lot of files. If your external file system is something that has a large cluster size, it can use a lot more disk space than you expect. Find out what the external filesystem minimum cluster size is, eg, if you write a 1-byte file to the disk, how much does your disk space go down. It can be a surprisingly large amount for certain drives using certain filesystems.

    ALSO: building for different targets will use a different amount of space for the Library directory, which is transient builds. You should never source control Library.

    You should however use source control at all times.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards

    Please consider using proper industrial-grade source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    Here's how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally setting Unity up (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place.
     
  3. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    53
    Thank you for your answer, Kurt!
    I do use source control and it wouldn't help here I believe. Same for the library folder as the project is 50Gb on my main SSD (on my computer) but 500Gb on my external SSD (with the same library, same targets, ...). My external SSD isn't a way to back up my projects but I simply don't have space anymore on my main SSD :oops:

    I think you're right about the cluster size. I read about people having issues with the minimum file size set too high and as you said, Unity project has a lot of small size files. I probably have to move all of my projects to my main drive, format my SSD and try again. Thank you for the helpful insight and detailed answer!
     
  4. FYI: Unity doesn't support having active projects on external, removable drives. You need to find a long term, proper solution to have a proper sized internal drive.
     
  5. Jihaysse

    Jihaysse

    Joined:
    Mar 29, 2020
    Posts:
    53
    Thank you for your answer.

    Why doesn't it support external storage? I have 3-4 projects on my external SSD and no issues. I only had issues when using a Cloud storage as it didn't pass the CaseTest from Unity.

    Unfortunately, I have no other solutions as I have an iMac with a tiny 250Gb SSD :oops:
    Next computer will definitely be a Windows with a 1-2TO SSD, lesson learned :D