Search Unity

What if the Unity project folder had a temp folder?

Discussion in 'Editor & General Support' started by Arowx, Feb 20, 2017.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    A lot of the files in Unity are generated and/or baked by subsystems and can be easily re-generated or will need to be regenerated for a new build.

    So why not have a temp folder where Unity can store any intermediate temporary regenerable files e.g.

    temp_lighting
    temp_occlusion
    temp_<useful name here>
    Then we would know that we can trim down old projects easily by removing their temp files.

    Just saying as I have lots of old projects and they do bloat out the hard drive and most of the bulk of them is in meta or generated / baked files.
     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    The concept is to make it explicit which folders contain engine generated data by their prefix.
     
  3. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Yeah, but why? The Library folder is quite explicitly that already, you can delete it and Unity will regenerate everything in it. Unless you are referring to a separation of temp assets that *should* be committed to the VCS but can be regenerated if necessary.
     
  4. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Imagine the difference between the list of files and folders you need to keep for your game now and a future where you can ignore/drop/delete all temp_* folders as they have generated content.

    Another approach would be to have a /Core/ and /Generated/ branching folders, so you would only need the core game content.
     
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    What are you attempting to solve by this suggestion of prefixes? Surely deleting the temp / lib folders trims project enough for storage?
     
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    The concept is how can Unity make it simpler to work out what files can be trimmed, can I just delete the Library folder or only some sub-folders.

    With a Temp post/prefix or Generated / Core branches then it becomes much clearer what files can be removed safely.
     
  7. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    But as it stands you can always safely delete the entire Library folder, provided you have visible meta files.
     
  8. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    OK, I see, so that you could drop, for example, all the GI stuff if necessary, as they are stored in the project itself, not the library.
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Not sure storage is a concern. Terabytes cost very little. Haven't been able to fill my drives for a long time - 5 years or more now.