Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Does my project folder need cleaning maintenance?

Discussion in 'Editor & General Support' started by pleasurehouse, Apr 8, 2021.

  1. pleasurehouse

    pleasurehouse

    Joined:
    Oct 15, 2020
    Posts:
    96
    I have noticed that the total size of my game project folder is strangely large in size. Its weighs is almost 5 gigabytes. And Unity takes more time each day to load the project...

    My scripts plus my sprites only weigh about 100mb. if I remember correctly I only installed cinemachine ...
    So, I don't understand that big size....

    So,I wonder if I have to do some periodic maintenance to the project to clean up the remnants garbage or something like that.

    Or not? And how to do it?

    Thank you so much!!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,519
    Unity temp-builds your project from
    Assets
    over into
    Library
    (next to it, and next to
    ProjectSettings
    ).

    There have been recent bugs where files in there grow unbounded but I think they have all been fixed.

    There should be no issue with closing Unity and deleting Library (or moving it somewhere else) and then letting Unity reimport everything again.

    In this same vein, please consider using source control in order to guard and protect your hard-earned work.

    This lets you trivially and confidently delete Library anytime you suspect an issue. Library is NOT source controlled in Unity.

    Personally I use git because it is free and there are tons of tutorials out there to help you set it up.

    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 the right .gitignore file:

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

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    5GB is a small project folder :p
     
  4. pleasurehouse

    pleasurehouse

    Joined:
    Oct 15, 2020
    Posts:
    96
    Thank you so much for your help Mr. Kurt!!
     
  5. pleasurehouse

    pleasurehouse

    Joined:
    Oct 15, 2020
    Posts:
    96
    Right now my game only has one player and one enemy ... it only has a monochrome tilemap, no stage, no images, no sound. It only has movement scripts, states, controls and interfaces. And a info UI with 4 TextMeshPro. I think 5GB is too much.. What will happen when i start to add more components and more scenes? The project will have 4TB weigh....
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The Library folder can still use up a lot of space. For example, I'm looking at a super simple prototype project of mine with no assets. It is just code to see what I could do creating a multithreaded galaxy movement and gravity system. The Library folder is 1.5GB. 900MB in Artifacts, and another 500 MB between il2cpp_cache and il2cppBuildCache.

    You need plenty of disk space for Unity projects. Any project I'm actually serious about usually ends up with a project folder more than 15GB.
     
    pleasurehouse likes this.
  7. pleasurehouse

    pleasurehouse

    Joined:
    Oct 15, 2020
    Posts:
    96

    ok, so I think I'm going to have to uninstall some programs to get more free space on my disk ... right now I only have 40GB available and I don't know how far my project is going to grow ..

    Thanks a lot for your help Joe !!
     
    Joe-Censored likes this.