Search Unity

Question I have a small general question that could help others: Trimming the fat

Discussion in 'Editor Workflows' started by goodnewsjimdotcom, Sep 27, 2022.

  1. goodnewsjimdotcom

    goodnewsjimdotcom

    Joined:
    May 24, 2017
    Posts:
    342
    Hello, I have a project with lots of free assets I downloaded off the asset store. I did not realize this taxes unity to have unused assets in the project. I want to remove as many that I do not use.

    Some assets are sub assets of assets that are used, is there a way to see that they're actively being used or not in the editor?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,982
    There's a build report (haven't used that though) and there is Asset Hunter on the store.
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    You can use Quick Search for that.

    Open the QS window (magnifying glass in the upper right corner of the screen), and search for
    ref:path/To/The/Asset
    . It'll show you everything that references that asset. It seems to also show sub assets - if you search for a ref to a Texture, it'll still show things only referencing Sprites that are subassets of that texture.

    You can automate this by using SearchService.Request to look for the assets referencing assets in an editor script.
     
  4. goodnewsjimdotcom

    goodnewsjimdotcom

    Joined:
    May 24, 2017
    Posts:
    342
    Based Baste
    ty, if you see me succeed and be a kachillionaire, just ask for your manilla gorilla envelope