Search Unity

Feedback Reducing File *count* in newer versions of Unity from average of 30K to 2K

Discussion in 'Editor & General Support' started by SilverStorm, Mar 17, 2019.

  1. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    557
    *Please be aware I am referring to the number of files in a project and not the project file size.

    I'd like to discuss options for cleaning up projects in terms of sheer file number count.
    The average project I have no matter how small simply has too many files within it most of which are library and meta file related. They average around 20K-80K number of files and deleting/copy pasting these is a pain to any collaboration/drop box or external hard drive.

    We have had some amazing updates to Unity and I would like to suggest we have some internal project changes to start with the way it handles *Meta files and the way the Library folder does it's thing into something much more clean and optimized.

    My basic idea is I know Unity generates a single Meta file for every file in the project so a good start is maybe have a single special master Meta file for each and every folder instead. When a folder is changed the master meta file is updated for that folder or something along those lines. It's a lot faster to have one master meta file for each folder and subfolder than it is a meta file for every individual file, this alone reduces the project file counts by 50%

    It's an idea but in 2019 the idea of having a project with thousands of tiny files is just not a good practice.

    The Library folder is also another area that may need improvement but I don't know enough about how it to really comment but what I do know is I have one project in which the assets folder contains 12,000 files-that's a lot of files for the assets alone. The thing is my Shader Cache folder contains 50,000 files and I am not sure if those are temporary files or what and if it's safe to delete them or not.

    I am not sure what's going on internally with Unity but I really do believe we can get a much better folder restructuring going on if enough people want it.

    Lets make Unity lean and green....
     
  2. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    557
    I would like to bump this thread so see if anything has changed in regarding this area.
     
  3. bobisgod234

    bobisgod234

    Joined:
    Nov 15, 2016
    Posts:
    253
    You should not be sharing your Library folder.

    My suggestion is to invest in a proper source control system such as SVN or GIT. Copying entire projects to each over via hard drives or Dropbox is a terrible solution for collaboration regardless of how many files Unity generates.

    Using big master meta files would work poorly with source control systems, whereas one meta file per asset works well.
     
    Lurking-Ninja likes this.