Search Unity

Delete unused assets from project

Discussion in 'Wish List' started by cgoran, Oct 10, 2006.

  1. cgoran

    cgoran

    Joined:
    Jun 11, 2005
    Posts:
    176
    Delete unused assets from project would be cool
     
  2. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    I don't know if this is what you mean, but have you tried clicking on it and then pressing command + delete/backspace?
     
  3. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Unity already only puts the needed assets in a built game depending on what scene is used etc. Is that what you mean?
     
  4. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    I think Cgoran means that when Hes cranking along, churning out the work, he finds he has 5 million assets, and loses track of whats actually used. Clearing out all the assets that hes not using is what I wish for this week too...
    So the project loads quicker. Yes I could have better work habits.....But deleting or even selecting ALL unused assets with one click would be kinda helpful...
    AC
     
    enriqueflores and Gotama like this.
  5. dan

    dan

    Joined:
    Jul 22, 2005
    Posts:
    151
    Or perhaps, take a page from Flash's book and have a button that will select all unused items. That way you could simply see what is unused or take an extra step and hit the cmd-delete combo and delete all the selected items.
     
  6. hsparra

    hsparra

    Joined:
    Jul 12, 2005
    Posts:
    750
    This happens to me. I like to experiment so I often end up with several slightly different versions, especially when dealing with scripts. Then I don't want to delete anything just in case I delete the wrong one, which I have done :( So, it would be great if we could have an option to delete all unused assets, or, an options to move those assets to a different folder which could be perused later.
    The selecting of unused assets would also be nice.

    It seems this capability is there, just that it is being used differently. Doesn't Unity produce a list of all assets that are in a build?
     
  7. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    It might be kind of hard to do this with some assets though.

    For instance, since prefabs often aren't instanced anywhere at runtime, but rather are instanced during execution by scrtipts, the only way the Unity editor could know that a given prefab isn't being used would be to parse all of the (currently used) scripts in your project. And all of the assets in your project (ie. textures, models, sounds) that are only used in prefabs would just add to the problem.
     
  8. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    couldn't you just compare the hierarchies?
     
  9. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Doesn't Unity already have a way to deal with prefabs when building projects?
     
  10. cgoran

    cgoran

    Joined:
    Jun 11, 2005
    Posts:
    176
    Yeah, I guess it's symtomatic of hecktic pace and poor work habbits, but It would be nice to be able to highlight any assets that are not being used by the project, to target them for removal.
     
  11. Bampf

    Bampf

    Joined:
    Oct 21, 2005
    Posts:
    369
    Not quite what you asked for, but if you look at your console.log file after building your exectuable with Unity, you see a list of the assets that were used. You could use manually that list to double-check before deleting something.
     
  12. sgmongo

    sgmongo

    Joined:
    Oct 9, 2011
    Posts:
    4
    Just +1ing this wish. Some of my projects have gotten so big and out of hand its just too daunting to clean manually... and easier to abandon the project.
     
  13. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    350
  14. Babesoul

    Babesoul

    Joined:
    Aug 31, 2011
    Posts:
    18
    Just wanted to bump this super helpful tool. Should be standard in Unity if you ask me.
     
    taguados likes this.
  15. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Great tool thanks and yes, should be standard
     
  16. Muckel

    Muckel

    Joined:
    Mar 26, 2009
    Posts:
    471
    lo normally it should be standard....
    well when did the tread start ??? how long is that ago ?
    so i don't know but ... i have a feeling that this will never be ...

    delete unused assets from project
    that should be standart !!!
     
  17. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    350
    Our blog is getting quite alot of hits from here after I posted the tool.
    The fourth most refering URL to our blog is actually this thread.

    I guess thats an indication that this is something we as developers want as standard in Unity.
    The tool is ok, but it could be implemented alot more elegantly since it solely relies on the build log.
     
    Last edited: Mar 2, 2012