Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Asset Hunter (Project cleaning tool)

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

  1. Anubis75

    Anubis75

    Joined:
    Jul 29, 2013
    Posts:
    24
    Hello,

    meaby i handle it wrong, i deleted the red marked rows.. this was wrong?
     
  2. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Asset hunter doesn't change your build at all, it only allows you to delete project files. So all the rows you deleted through Asset Hunter should be fine. My guess is that you create your build outside the project folder structure, if so, my tool wont change any build files.

    My best bet would be that your build actually failed at some point if you are missing files next to the executable.

    It is a PC build you are making?
     
  3. mike_kennedy989

    mike_kennedy989

    Joined:
    Feb 5, 2014
    Posts:
    51
    Is the Resource folder ignored?
    I can't seem to find it listed even though My build draws pretty much everything in the build from with in the Resource folder in a sub folder.
     
  4. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Mike

    Yes, the resource folder is ignored since Unity by default adds everything in that folder to the build. The reason for that is that you can load anything from that folder using "Resources.Load(path)" at runtime. Therefore Unity has decided that everything in Resources folder is included in build.

    Hope this makes sense
     
  5. Percy-Pea

    Percy-Pea

    Joined:
    Aug 31, 2014
    Posts:
    75
    Hi, Does your tool work in OSX? As i can't seem to get it to :( I'm running Unity 5.4.1. And the Asset Hunter window consistently says I need to make a recent build.

    I initially wondered if the problem was due to my project set to build for IOS, so i've changed it to OSX, but it still doesn't seem to realise a recent build has indeed been made :(

    Thanks
     
  6. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Percy

    Been a while since I've made a OSX build myself, but I've had no issues reported. I'm at my day job atm, but I'll give it a spin as soon as possible.

    If possible, could you mail me a screenshot (contact@heurekagames.com) of how Asset Hunter looks after you have created a new build.


    Thanks
     
    Last edited: Oct 29, 2021
  7. Percy-Pea

    Percy-Pea

    Joined:
    Aug 31, 2014
    Posts:
    75
    Hi Kristian, thanks for the quick response, I actually have bootcamp running as a virtual machine, so installed the same version of Unity 5.4.1 there and copied the project across. On Windows it does indeed seem to work properly, so i'm guessing it's an OSX issue rather than user error. Have linked a screen grab from OSX. The window is always like this, no matter what I build (IOS, OSX, Windows). https://we.tl/UVgAXGXCU2
     
  8. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Thanks, helps a lot. I will try to figure out whats going on :)
     
  9. mike_kennedy989

    mike_kennedy989

    Joined:
    Feb 5, 2014
    Posts:
    51
    Thanks for clarifying, that's too bad since Unity won't let me move the assets out of the resource folder on this project.
     
  10. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Percy

    I haven't forgotten about you, but I need some hardware issues I need to sort out before being able to properly test.
     
  11. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    I click "load Build Log(Required)" after i build and i get the spinning pinwheel for about 2 seconds then nothing... Now what?
     
  12. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hmm, it seems like my tool is unable to find (Or parse your build log)

    Try to:
    Start Unity
    Open Asset Hunter
    Create a build
    Press the "Log updated (Refresh button)" if avaliable
    Press the "Open Log" button in Asset Hunter
    Copy the content of the log and send that to me (Either here or to contact@heurekagames.com)

    Thank you

    (Also, if you could provide me with some info like, Windows/Mac, Unity version, Asset Hunter version and your current build target)
     
    Last edited: Oct 29, 2021
  13. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    email sent..
     
  14. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Email received. Will take a look as soon as possible
     
  15. Lapius

    Lapius

    Joined:
    Mar 3, 2013
    Posts:
    11
    Holly Jesus... I really needed this asset hunter :D 30gb project, I'll post how much I cleaned, allready waiting 10 min.
     
  16. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Yes, I'm also often surprised how much obsolete stuff is in my projects when I run Asset Hunter.
    The wait is partly because of a memory restraint from Unity, that forces me to clean up memory once in a while (Which has a time overhead)
     
  17. Lapius

    Lapius

    Joined:
    Mar 3, 2013
    Posts:
    11
    When i make some folders to exclude, why it scans assets again? cant it just hide or something that folders, and just fully exclude on other scans?
     
  18. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Yes I agree, that would make more sense. I will add that to the backlog
     
  19. Lapius

    Lapius

    Joined:
    Mar 3, 2013
    Posts:
    11
    Also found that it wants to delete my using prebaf and its material, but not original .fbx file. Altho I am not completly sure if I really use it. Furthermore, then I change something in scene and then revert it, like put some prefab just to check everything on it and then delete and save it, in asset hunter, in select mode every item goes blank, only foldershave names. Not sure why is it so.
     
  20. Lapius

    Lapius

    Joined:
    Mar 3, 2013
    Posts:
    11


    So this is how much space it deleted. Thanks for this great plugin.
     
  21. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    With regards to prefab being unused and fbx being used, I'm not 100% what going on there. Perhaps the FBX is used in a different prefab? I'm heavily relying on Unity's build log to identify used stuff, and it would seem your FBX is added to build.

    With regards to the "blank item" I will try to see if I can repro
     
  22. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351


    That's great to see. Thanks for sharing
     
  23. Lapius

    Lapius

    Joined:
    Mar 3, 2013
    Posts:
    11
    Actualy o saw that i had double asset folder, the end size of project is around 9gb
     
    hopeful likes this.
  24. Miguel-Ferreira

    Miguel-Ferreira

    Joined:
    May 8, 2015
    Posts:
    90
    Hi, just a quick question, does Asset Hunter 2 support Asset Bundles?

    I only have one bootstrap scene in my project, and all other scenes are loaded through Unity's Asset Bundle mechanism.

    Regards,
     
    Last edited: Nov 23, 2016
  25. dmarqs

    dmarqs

    Joined:
    Oct 16, 2013
    Posts:
    41
    Hi, great asset, but I can't find the assets referenced in my scenes, even I know that the asset is in use. This is what I'm receiving:

    Asset not referenced in any scene, most likely a part of the "resources" folders
     
  26. piina

    piina

    Joined:
    Mar 3, 2016
    Posts:
    1
    Hello, I make a build of my game. Still it displays red button saying "Load Build Report(Required)".
     

    Attached Files:

  27. MetaDOS

    MetaDOS

    Joined:
    Nov 10, 2013
    Posts:
    158
    Last edited: Mar 8, 2017
  28. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Miquel

    I will actually have to test this out, but i'm 99% sure it will since Unity is either including them in the build or downloading them externally.

    NB: Sorry for the (Very late reply) for some reason I have not received any mail about new messages in this thread for quite a while.
     
    MetaDOS likes this.
  29. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Piina

    I had someone else mention this problem in November (Through mail). He ended up figuring out that his project was in some way corrupted. He copied his files into a new project and everything worked. I will post his mail reply here:

    I may have been wasting your time.
    I’ve just tried the project again, and sure enough it told me to make a new build. This time I built it for IOS, but did ‘Replace’ instead of ‘Append’ to the Xcode project.

    Having done this, Asset Hunter now changed to the red button to load/update the log. And it all seems working!

    I’m not 100% convinced if it was because of the replace vs append build option, or if it was a simple case that restarting Unity (having tried the test project where it worked) that fixed it.

    Hopefully this can help you, if not please let me know - Here or through mail.

    NB: Sorry for the (Very late reply) for some reason I have not received any mail about new messages in this thread.
     
  30. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi dmargs

    That means that the file lives in "Resources folder" which Unity includes by default, so all scenes can potentially reference those assets through code.

    NB: Sorry for the (Very late reply) for some reason I have not received any mail about new messages in this thread.
     
  31. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi LeGiangAnh

    I have a hard time actually noticing the response slowdown, but that's not saying it doesn't happen. When creating asset hunter I had similar problem if I had large projects and I expanded all folders inside Asset Hunter. The reason for that is drawing a very large amount of Unity IMGUI on screen is slow. To counter that I made sure all folders are collapsed to begin with, and you can then choose which folders to expand.

    Please let me know if this helps you, and if not, please send a couple of screenshots so I can see how the AH window look (How many folders are open, and how many files are visible) Also if you could tell me your CPU
     
  32. Emericanized

    Emericanized

    Joined:
    Apr 30, 2010
    Posts:
    23
    Hey Kristian, Did you ever wind up verifying asset bundle support?
     
  33. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Didn't at the time - but just did. And as much as hurts me to admit, my 99% certainty didn't pan out. Asset Hunter does NOT support AssetBundles.

    Never really used assetbundles and didn't realized that way Unity is loading assetbundles prevents me from actually detecting if they have been used or not.

    So no, doesn't support asset bundles
     
  34. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    Hey, someone might've already done this but I figured I may as well put it out there. Made a script to check the project for materials that are using a shader. Of course, shaders can be used by other shaders or through scripting, but its nonetheless useful.

    Naturally it could be fancied up allot, sent to a background process (edit: or not - system.io would be efficient though), etc.

    Think it'd be a nice addition to asset hunter, I can imagine it'd be a neat thing to check through the context menu for individual assets (well, ideally the project view right click menu) for a couple other things as well.
     

    Attached Files:

    Last edited: Mar 29, 2017
  35. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hey LittleSettler

    I'm at my daytime work right now, but will definitely give it a look through when I get home. Thank you so much for sharing
     
  36. Percy-Pea

    Percy-Pea

    Joined:
    Aug 31, 2014
    Posts:
    75
    Hiya! Been a while... so long in fact I even forgot my past posts and forgot that AssetHunter 2 doesn't seem to work on OSX (still keeps asking for a build to be made). I've just updated to latest version and is sadly still the case. Just thought i'd let you know, would love a solution :) (Other than going into windows/bootcamp ) :)
     
  37. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Percy

    I can remember your problem, but I also seem to remember we had an email correspondence where you said the problem was solved (Something about replace/appending to xcode?).

    If that is not the case, let me know and we can try to figure out whats going on.

    NB: Any new project you create seems to work, right?
     
  38. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
  39. CrystalConflux

    CrystalConflux

    Joined:
    May 25, 2017
    Posts:
    107
    I've been looking for a tool like this, thanks heaps!
     
  40. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Glad you found it useful. Enjoy!
     
  41. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Love this tool, but Asset Hunter is throwing compile errors in 2017.1.0b9
     
  42. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Thanks for letting me know. Will submit a fix today (Will probably be available for you in 3-4 workdays)

    If you just want it to compile now, find this code in "AssetHunterMainWindow.cs":

    Code (CSharp):
    1. #if UNITY_5_3_OR_NEWER
    2.                 m_window.titleContent.image = m_window.m_UISmallLogo;
    3.                 m_window.titleContent.text = "Asset Hunter";
    4.  
    Now replace the lines immediately after with this:
    Code (CSharp):
    1. #else
    2.             m_window.title = "Asset Hunter";
    3. #endif
     
    buttmatrix likes this.
  43. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I̶'̶m̶ ̶s̶o̶r̶r̶y̶,̶ ̶I̶ ̶d̶o̶ ̶n̶o̶t̶ ̶s̶e̶e̶ ̶t̶h̶i̶s̶ ̶c̶o̶d̶e̶ ̶i̶n̶ ̶A̶s̶s̶e̶t̶H̶u̶n̶t̶e̶r̶M̶a̶i̶n̶W̶i̶n̶d̶o̶w̶.̶c̶s̶(̶?̶)̶
    EDIT: Just got update, will give it a go.
     
    Last edited: Jun 20, 2017
  44. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    The update should do the trick.
     
  45. Nikolasio

    Nikolasio

    Joined:
    Dec 6, 2014
    Posts:
    59
    Hi,

    I get these messages:

    "A meta data file (.meta) exists but its asset 'Assets/Gizmos' can't be found. When moving or deleting files outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it."

    How do I find the corresponding .meta to be deleted in the project folder?

    Cheers,
    Nikola
     
  46. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Nikola.

    I'm pretty sure its not a problem that relates to Asset Hunter, seems like it happens when moving/renaming files from within monodevelop/Visual studio.

    https://connect.microsoft.com/Visua...uses-asset-database-refresh-warnings-in-unity

    https://stackoverflow.com/questions/42137624/unity-metafiles-errors


    My best guess is there is a file in the "Assets" folder that is called "Gizmos.meta", if there is, try to delete that
     
  47. Djaydino

    Djaydino

    Joined:
    Aug 19, 2012
    Posts:
    48
    Hi, Just a quick question.
    Is this compatible with playmaker?
    Someone on the playmaker forum got this asset and his build (windows) crashed right away.
     
  48. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    I have had playmaker in projects that I've used Asset Hunter on with no problems, and cant say how they would be able to be incompatible. Never heard about anyone having such a problem.

    And even if you would encounter such a problem you can choose to ignore the "Playmaker" folder in the Asset Hunter settings
     
    Last edited: Jul 9, 2017
  49. Djaydino

    Djaydino

    Joined:
    Aug 19, 2012
    Posts:
    48
    The crash indeed is not related to playmaker and Asset Hunter.

    I do not own Asset Hunter (yet) so i could not test this.
    Thats why i asked here :)
     
  50. KristianHJ

    KristianHJ

    Joined:
    May 28, 2010
    Posts:
    351
    Hi Djaydino

    Thanks for letting me know :)