Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Asset Hunter (Project cleaning tool)

Discussion in 'Assets and Asset Store' started by KristianHJ, Oct 15, 2014.

  1. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    You should definitely update. Since 2.1.0 there has been following changes:
    Quite a lot of them if about deletion and multi selection
    • Fix for BuildReport.Files being deprecated in 2022
    • Fixed issue with incorrect asset size
    • Fixed issue with OnProcessScene being called when entering playmode
    • Fixed issue with Upgrader being Editor Only
    • Moved to UPM Package format
    • Added null checks in dependency graph
    • Exclude shaderinclude files by default because of Unity dependency bug (2021.2 and newer)
    • Removed obsolete code
    • Fixed bug where selecting folders would not delete/Backup the corrent assets
    • Fixed bug where selecting multiple asset when clicking backup would cause AHP to ask you to backup multiple times
    • Improvements to Mass Delete
    • Improvements to Empty Folder Deletion
    • Fixed faulty documentation link
    • Fixed issue with progress bar not actually moving when analyzing project
    • Fixed warnings when trying to delete empty folders
    • Reduced logfile size
    • Tweaked logfile datamodel
    • Improved speed by not requiring assetsize calculations by efault
    • Updated documentation file
    • Fixed bug with header
    • Added MenuItems to Tools in menu
    • Tweaked button layout
    • Fixed issue with Window Store Apps (WSA) Ressources
    • Fixed issues with icon colors in light editor theme
    • Added settings to control automatic sync after projectchanges
    • Improved multiselection in treeview to improve delete functionality
    Note however that in 2.2.8 I moved AHP to the UPM format as mentioned in this post.
    I was worried at the time it might introduce some quirks during upgrade from older versions, but havent heard anyone talk about that, so It should be unproblematic.
     
    Romaleks360 likes this.
  2. majidarif

    majidarif

    Joined:
    Sep 11, 2015
    Posts:
    26
    Hello, I think the build is actually completed already hence the "FinishPhase" but it gets stuck there. And yes, I've confirmed removing AHP brings back the original build time.
     
  3. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hmm, never heard about this being an issue before, so its hard for me to reproduce - I will keep looking though.
    I dont assume its possible for you to share your repo with me?
     
  4. danam

    danam

    Joined:
    Mar 30, 2015
    Posts:
    11
    Hi @KristianHJ , I recently purchased your Unity Utility Asset hunter pro and I have a few questions:

    1) I would like to export the list of unused assets for use in a spreadsheet to present to my dev team. Does Asset Hunter Pro have this capability?

    2) I am running this utility on a large scale Unity project, where I may designate this utility in my git ignore list. Is this going to cause any issues when I push my changes ?
    How do I add this utilitty to my .gitignore file so it is not included in my repo?

    3) Is there a way to ignore assets that are not used, but have dependencies?


    Thanks for your help, I love the product so far!
     
    Last edited: Feb 8, 2023
  5. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hi danam, thanks for your message. Answered your mail, but adding info here too so other people can use it :)

    1: You can export a json file like this:
    exportlist.png
    It exports whatever is selected in the tabs “Unused/Used/All”. E.g. if “Used” is selected it exports a list of used assets.


    2: Git ignoring AHP might be a bit tricky since its a "Package" and not an "Asset" - which means it will never be part of the repo, but downloaded to each users computer through the package manager. I dont know of a way to control this individually but the question was asked here https://forum.unity.com/threads/local-override-manifest-json.1096891/


    3: I don’t have an automated way of ignore ‘unused with dependencies’ but there are several ways of ignoring in AHP. By folder, by name, by extension etc.

    You can learn more here https://kristianhj.gitbook.io/asset-hunter-pro/additional-windows/ignore
     
  6. danam

    danam

    Joined:
    Mar 30, 2015
    Posts:
    11
    Thank you for your response. Just incase others want to be able to create a list of used/unused assets: Using "Export list" creates a file of type .ahfiledump, but it's a basic JSON format. I used https://jsonformatter.org/ to make the json readable. To import into GoogleSheets you need a JSON API host, I used https://www.pastebin.com and added a free Google Sheets add-on KPIBees to import into Sheets, and I'm ready to show the team!
     
    KristianHJ likes this.
  7. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hi Again danam.
    It rubbed me the wrong way that you had to jump through those hoops in order to get something presentable in gsheets, so I've added the option to export in both csv and json format.
    upload_2023-2-10_12-36-40.png

    Resulting in:
    upload_2023-2-10_12-38-45.png

    I also modified the default file name a bit so it becomes:
    "AHP_*PROJECTNAME*_*BUILDDATE*_*BUILDTARGET*_*LISTTYPE*
    Hopefully that should make it easier to manage differences between different builds.
    v2.2.16 is avaliable now in the asset store, and contains this new feature
     
    Last edited: Feb 10, 2023
    danam likes this.
  8. danam

    danam

    Joined:
    Mar 30, 2015
    Posts:
    11
    this is awesome! Thank you. One other thing that would be helpful is to include the filename as one of the list attributes.I had to do some parsing to extract filenames from the paths
     
  9. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Yeah, was thinking about adding that, but since we can have multiple scene files named the same, but saved at different locations i would have to add the full path. Having to store multiple paths for maybe many thousands of assets could spiral the filesize out of control.

    For now I will stay with just the scene GUID although I understand the reasoning for wanting the filenames. Just havent found the right way of doing it yet.

    If this is something you really need, could you please elaborate on your usecase (Either here or through mail)
     
  10. danam

    danam

    Joined:
    Mar 30, 2015
    Posts:
    11
    The use case is mainly for designers (or nonengineers) to have a quick reference to particular assets. No biggie. ;)
     
  11. DrNim

    DrNim

    Joined:
    May 31, 2022
    Posts:
    1
    Hey Kristian, I love this tool and just wanted to make one suggestion. I am using a WebGL template and I noticed the "index.html" file of that template is turning up as an unused file. I may be missing something, but I suspect you would always want to exclude the "WebGL Templates" folder in the main Assets folder.
     
  12. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    466
    What's the deal with this "Achievement Unlocked Obsessive Compulsive Cleaner"? After I delete a few things it won't let me do anything until I create a new build. This is AMAZINGLY ANNOYING!
     
  13. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Sorry, completely missed this message. Never used WebGL templates, but that definately sounds like a good idea. I will get than in a future update. Untill then, you can manually exclude the folder in settings. https://kristianhj.gitbook.io/asset-hunter-pro/additional-windows/ignore
     
  14. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hi jnbbender. Sorry to hear you are experiencing problems. The "Achievement unlocked" is just meant a fun little easter egg when your project is completely clean of unused assets. It was definitely not indented to obstruct workflow in any way.
    So I just need to understand:
    1: You create a build
    2: Open AHP
    3: Deletes a few unused assets (Not all of them?)
    4: You see the "Achievement Unlocked"
    5: You create a new build
    6: Now you see some unused assets again?

    Am I understanding you correctly?
     
  15. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    466
    Yep. That's when I uninstalled then reinstalled Asset Hunter.
    If it helps I am using 2022.2.11. I was having issues with Kronnect Shader Control. He fixed it because of some of the caching that 2022 does, if that helps.
     
  16. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    The "achievement" only shows when the project is clean, and therefore rebuilding should not make it disappear. I will investigate and see if I can repro. Thanks for the bug report.

    EDIT: I have been unable to repro. The "Achievement" only appears for me when the project is clean. Maybe the problem is that I dont communicate well enough that that is in fact what it means. I will try to make a clearer in the UI.
     
    Last edited: Apr 12, 2023
  17. osgseb

    osgseb

    Joined:
    Jan 17, 2022
    Posts:
    18
    Hello,

    I have just installed Asset Hunter Pro 2.2.17 on a Unity 2022.2.11 project running on a Mac M1 and when I clicked on "create a new build" nothing happens, not even an error or a warning on the console. Any idea what's going on ?

    Thanks
     
  18. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    You want to see this in the log after creating a new build:
    upload_2023-4-12_15-11-5.png

    The process is:
    1: Open a project
    2: Open AHP
    3: Create a build (File->BuildSettings->Build)
    4: AHP will ask you if you want to load the infofile (which was just generated)
    5: Press yes
    6: The build report will be presented to you

    You can also read the documentation here: https://kristianhj.gitbook.io/asset-hunter-pro/guides/getting-started
    Hope this helps :)

    NB: From now on you can just have AHP load that infofile at any point if you want to see the report
     
  19. DuffyPixcell

    DuffyPixcell

    Joined:
    Sep 16, 2018
    Posts:
    7
    Just started working with this asset, and for some reason every time I try to 'find duplicates' the progress bar gets about half way and then the project crashes completely. Any advice?
     
  20. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hi Duffy, never heard about this issue before. Is it a very, very big project? Also is there anything in the editor log files which might give some indication?

    EDIT: Its a long shot, but I found some "leftover debug code" which should have been deleted. If you have thousands of assets in any folder called "navmesh" that might have triggered an out of memory issue. I just pushed an update to the asset store. Again, it's a long shot, but maybe that was the cause of the problem you are experiencing.
     
    Last edited: May 6, 2023
  21. AcIdSaMa

    AcIdSaMa

    Joined:
    Dec 5, 2012
    Posts:
    13
    Well looks like I also have the issue as well of builds not wanting to complete first time it got stuck at the "FinshPhase", now it gets stuck in copying resources.resource.

    If I uncheck auto generate log in the settings my builds finish.

    I'm using 2022.1.24 if that has anything to do with it..
     
  22. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hi AcidSaMa, sorry to hear you are experiencing problems.
    There is many forum threads about Unity getting stuck in build process, so I need some more info to figure out what is happening.

    Would it be possible for you to follow the steps in this thread and send me the editor log. That might help me figure out what your problem is.
     
  23. cadris_unide

    cadris_unide

    Joined:
    Jun 11, 2022
    Posts:
    3
    Hi, I am new to asset hunter pro. I do not know much about it.
    I had completed my project then I think to decrease the size of project . So I choose Asset hunter pro to do so.


    But main problem is that my some essential models and textures got deleted. So I want to recover them. so how can I do this?? Please help me! I need this :( and I do not click on backup button while deleting...


    Thanks
     
    Last edited: May 31, 2023
  24. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    Hi cadris_unide

    Asset Hunter PRO shows which assets can be deleted based on info from latest build. Maybe you did not have the correct scenes set up in build settings?

    Asset Hunter has a "Backup and delete" button. If you chose that option, simply doubleclick the backup file. If you did not choose that option, then you need to use your version control to get the files back. If you do not have version control control set up, then I'm afraid I cant help you.
     
  25. cadris_unide

    cadris_unide

    Joined:
    Jun 11, 2022
    Posts:
    3

    Thanks for replying.

    But not able to recover them because I do not choose backup while deleting and I do not have any version control.
     
    Last edited: May 31, 2023
  26. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    340
    I'm very sorry to hear that, but I fear that I cant help you then. Maybe look in trash and see if it is there.