Search Unity

Maintainer

Discussion in 'Assets and Asset Store' started by codestage, Mar 10, 2015.

  1. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    Hey just trying out this asset in a huge project (2018.1.0b9)

    Unfortunately this error popped up when it was searching through the scenes.

    upload_2018-3-13_11-0-23.png
     
    codestage likes this.
  2. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @Little_Gorilla

    Thanks for reporting this.
    Looks very strange and rare actually!

    Could you please contact me privately and share any kind of reproduction case to let me try reproduce it on my side? I really eager to look at this case by own eyes.

    Looks like it fails at the selected line inside of the List class:

    upload_2018-3-13_21-23-54.png

    But the list is initially set to the capacity equal to the components count and Capacity setter shouldn't be called unless another list or array is added to the list, which should be not possible since I iterate separate components.

    Also looks like it somehow tries to add object(s) of type not compatible with Component type which is very weird again.

    Very interesting case.
    I wonder if it reproduces in Unity 2018.1b10 or 2017.3.1, would be nice to know this.
    Also I've sent you build with attempt to workaround this exception, would be nice to know how it works for you!
     
  3. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    Amazing asset..
    Say I have 5 prefab reference results (same prefabs that references a script) - clicking on the eye icon will only select 1 prefab on the Hierarchy window.
    Even though it correctly find the 5 prefabs, clicking on each of the prefab's eye icon does not select their corresponding prefab object on the Hierarchy. I still have to manually look for those prefabs on the Hierarchy or filter it.

    Is this the correct behavior? IMHO, I think it would be much better if the behavior is, it would select all the respective prefabs on the Hierarchy.
     
    codestage likes this.
  4. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @silvershunt

    Not sure I understood correctly your issue =/
    Eye button usually shows single item it relates to. In case of Prefabs it can select and show in Inspector deep objects in Project hierarchy which are not visible in project hierarchy.

    Could you please illustrate with screenshot what did you mean ?

    Thanks!
     
  5. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    Hold on a sec.. I'm preparing it..
     
  6. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    I want to find what are the prefabs / models on my current scene (Demo2.unity) that uses the "Atlas1.mat" material.
    I got 3 prefab results on the scene - screen1.jpg (below image)





    But if I click on the eye button on each of those 3 prefabs, it only selects "one of the 3 prefabs" on the Hierarchy. Clicking the first eye button will select the prefab on the screenshot below, and the same prefab will be selected if I click the eye button of the 2nd and 3rd search result.


    I'm expecting it to select its corresponding prefab on the Hierarchy. So in this case, I have to filter it to be able to view those 3 prefabs - screen3.jpg


    Hope the above makes sense.
     
    Last edited: Mar 26, 2018
    codestage likes this.
  7. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    Is it because they are on the same prefab on the Project assets?
     
  8. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Thanks for all the details provided!
    It's definitively a bug. It should select one of those 3 prefabs you have in scene but always selects the first one. The bug cause is related to the same name prefabs have in scene.
    It will be fixed with next update, thank you for reporting this!
     
  9. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    Awesome, thank you.
     
  10. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey all!

    Glad to let you know another update to 1.4.1.0 is live on the store!
    It brings lots of fixes and few improvements in different modules, so I strongly suggest to update ^^
    Huge thanks to everyone who reports bugs and suggests improvements, this is highly appreciated!

    More improvements and squashed bugs are landing to the trunk, so stay tuned!

    Here is a full changelog:
    - Project Cleaner:
    - now ensures scenes are saved before search
    - no longer treats .asmdef as garbage by default
    - no longer treats SpriteAtlases as garbage if sprites are used​
    - References Finder:
    - now finds Assembly Definition references in another asmdefs​
    - switched some core code to GUIDs improving overall stability
    - minor changes in scenes state checks in all modules
    - increased some icon lookup code stability
    - fixed 2018.1b12 regression incompatibility (thx Fausto)
    - fixed incorrect file names treating in some modules on Windows
    - fixed incorrect files treating after rename \ move (thx Liuyang)
    - fixed prefab instances selection in scene (thx silvershunt)
    - fixed scene icon lookup in Unity 2018.1+
    - other minor changes
     
  11. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Heya, one more release 1.4.2 is online!

    Among few fixes, it brings extended Unity 2018.2 support with ability to search for the Packages references in your project:

    1.gif

    Also I'm glad to let everyone know I've launched new twitter account solely for the Code Stage products news and updates for those who do prefer to follow non-personal and official channels:
    https://twitter.com/codestage_net

    Feel free to subscribe to know first about updates, news, highlights, upcoming features and so on.

    1.4.2
    - added support for Unity 2018.2 API changes
    - added support for Unity 2018.2 menu changes
    - added support for Packages in Project Browser (Unity 2018.2b2+)
    - switched to X.X.X version tracking format
    - removed minimal window size restriction (window reopen required)
    - fixed logo texture bleeding at some cases
    - minor refactorings and performace improvements
     
    Xtro likes this.
  12. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    One more 1.4.3 update to complement previous one is live!
    Makes it more stable and fixes few things ^^

    - now References Finder skips references at the packages
    - Issues Finder will not find empty array items at ParticleSystemRenderer anymore (thx Daniele)
    - fixed reveal reopened scene in some cases
    - fixed drag&drop accepted for incorrect assets kind in few places
     
  13. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Hello,

    I have found the following bug: when removing missing components from prefabs, if they have hidden flag HideInInspector the fix will not work.

    To fix this, I was forced to instantiate the prefab in the scene, apply the fix there and apply the changes back to the prefab. It seems that Unity has weird behaviour when this flag is on and a script is missing: it doesn't show it in the prefab inspector, but it does if you drag it into the scene.

    Here is my quick dirty fix:
    Code (CSharp):
    1. // File: IssuesFixer.cs
    2. // Method: FixMissingComponents(...)
    3.  
    4.             if (touched) {
    5.                 ...  
    6.             } else {
    7.              
    8.                 var instance = (GameObject) PrefabUtility.InstantiatePrefab(go);
    9.                 FixMissingComponents(issue, instance);
    10.                 PrefabUtility.ReplacePrefab(instance, go, ReplacePrefabOptions.Default);
    11.                 Object.DestroyImmediate(instance);
    12.             }
    PP: Your idea of removing missing components is really neat! Great job! Believe me, I know! I've battled this and lost :( All the solutions out there just point out the objects that have missing components or they try to remove them, but they don't do it properly. Your method removes correctly the component entry in m_Component array as well as the component data itself! Bless you!!!
     
    codestage likes this.
  14. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @NibbleByte3

    Huge thanks for reporting this and even more for providing a workaround fix!
    It will be investigated and fixed in closest updates.

    Also glad to hear you find Maintainer helpful, it's always a pleasure to know my work helps someone else.
     
    NibbleByte3 likes this.
  15. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey again, @NibbleByte3

    It was a bit challenging and extremely fun, but I found a super simple but really not obvious way to apply my usual missing script removal code for the missing scripts with HideInInspector hide flags both on prefabs and in the scene, so no prefab instantiation will be needed and it's much faster than that ^^

    Please let me know if you wish to try it out before next release and I'll send you a copy via PM.
     
  16. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey everyone!

    I have 2 good news ^^

    First: I'm glad to let you know PDF Documentation was refactored, updated with new contents page and clickable links for better navigation, and it's available online now!
    http://codestage.net/uas_files/maintainer/readme.pdf

    upload_2018-7-12_4-9-44.png

    Second: new 1.5.0 update is on the way (Asset Store has tech issues on the backend now so it was postponed until issues will sort out and then will be sent for review).

    There will be separate post about 1.5.0 with more details when it will be available at the store.

    Have a good browsing!
     
  17. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Glad to let you guys know, Maintainer 1.5.0 is live on the store now!

    This update brings fixes, stability improvements, 2018.2 Packages compatibility improvements, and new search for the component script right from inspector feature: now you can can search for any MonoBehaviour script references across the project either from the component's context menu or just with dropping component to the References Finder tab:

    references_finder_script_component.gif

    More to come, stay tuned!

    - Issues Finder:
    * now can remove HideFlags.HideInInspector missing scripts (thx NibbleByte3)​
    * now takes exposed reference into account when looking for duplicates
    * now takes fixed buffer size into account when looking for duplicates
    * now takes int versions of Vectors, Bound, Rect, into account
    * now component filters tab accept drop of the Component-derived script files
    * duplicates analyze performance improved
    - References Finder:
    * now script references can be searched from the component context menu​
    * performance improved a bit for projects with lots of external packages added
    * fixed NullRef exception for projects with specific asmdefs (thx Andrey)
    - improved reveal code stability with Unity bugs workarounds
    - fixed incorrect processing of the Packages files in some cases
    - fixed parent folder ignores could not work on Windows (thx Can)
    - fixed 1.4.3 regression where Type filer kind was exposed in path filters tabs
    - minor UI improvements
    - all code usings re-organized to prevent ambiguity with third-party classes
    - some legacy code removed
    - readme docs were slightly updated
    - minor fixes
     
    mgmhunt likes this.
  18. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Maintainer 1.5.1 is live on the store!

    Highlights of this release:
    • critical Project Cleaner fixes to prevent possible data loss
    • personal settings like window size, lists sorting and such are stored in the separate file now, at the Library folder to let you ignore it in your VCS (whole Library folder is usually gets ignored actually), no more merge pain!
    • different filtering improvements
    • lots of other fixes and improvements across all modules (take a look at the spoiler below)
    - personal settings now stored at Library folder, ignore it in VCS (thx Unnar)
    - Issues Finder:
    * now ignore added from the results context menu gets automatically applied
    * fixed component ignores were applied incorrectly​
    - Project Cleaner:
    * now assets added to the AssetBundles are treated as needed and auto-ignored
    * added option for project rescan after adding ignore from context menu
    * added *.extension ignore to the quick ignore actions
    * fixed possible data loss when using some specific file types in the project
    * fixed possible data loss when using SpriteAtlases with folders for packing
    * fixed possible data loss when using 'Include in Build' SpriteAtlases option
    * fixed possible default ignores cleanup leading to data loss​
    - References Finder:
    * now automatically expands found item when selecting it
    * now finds ScriptableObjects' scripts references from context menu (thx Fausto)​
    - improved Reveal feature multi-scene handling
    - improved Reveal feature overall scene handling quality
    - starting from Unity 2018.1 settings are saved now when exiting Unity
    - default filters are case-insensitive now
    - extension filters accuracy improved
    - Unity crash on missing script context menu call worked around
    - fixed path ignores couldn't be added with ignore case option
    - fixed Maintainer window didn't focused in some cases when it should
    - fixed Maintainer window did focused in some cases when it should not =)
    - other minor changes
     
  19. Syganek

    Syganek

    Joined:
    Sep 11, 2013
    Posts:
    85
    Hi,

    First of all, great asset.

    We've recently bought it in our company. We added it to already finished project that needs refactoring. I've run the reference scan to build this initial info for future assets reference searches. My question is. How long does it usually take?

    Our project is medium size in terms of the amount of assets i think.

    I'm bringing up this question because it was already a few hours and it still is parsing first asset.

    upload_2018-10-19_18-6-58.png

    Is it supposed to take this long or something went wrong? Unity Editor is currently not responding but it is something that this engine does when it comes to looped operations so I don't really know should I restart it or just leave it running for the weekend.
     
  20. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @mathewp

    Thanks for your purchase!

    Usually first search takes some time, especially on big projects, with lots of assets, when whole project references search is made.

    Single asset references search usually runs much faster.

    If it takes that long for your project - it does not look right and should not happen anyway =\

    Please, give it a try and leave if for few more hours if it's possible, just to make sure it will not proceed and it's an infinite loop-like issue and not the performance degradation issue.

    Also, if you'll not see it proceeds, could you please try to make a single asset references search if you did a whole project search previously?

    Looking forward to any news on this problem.
     
  21. Syganek

    Syganek

    Joined:
    Sep 11, 2013
    Posts:
    85
    Hi,

    It was still stuck so I've cancelled the search.

    I tried finding reference to a single asset and it was pretty fast. After that I've tried to find reference to all assets again and it stuck again on first asset. I think I can live with single asset searches for know. It would be nice if I would be able to scan entire project though.

    I have another question. Does your asset support Scriptable Objects and instances of Scriptable Objects inside other Scriptable Objects? We have a SO based custom node editor tool that if we would be able to scan with Maintainer as well it would be great! If not, do you plan to add such support?
     
  22. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @mathewp

    Thank you for the additional information!
    I'm sorry to hear full project search stuck for your project, this is a definitively some kind of the infinite loop bug =\

    More responsiveness and more information about current processes will be added in next update to make it easier to debug such cases.

    Scriptable Objects and their instances should be searchable in the references finder, please let me know if it does not work for you.
     
  23. Syganek

    Syganek

    Joined:
    Sep 11, 2013
    Posts:
    85
    It looks like it stucks when I'm trying to find instances of Scriptable Objects.

    It stucks same as I've described above but on different asset count, i.e. 8974.

    Maybe it's has something to do with that how we're treating our Scriptable Objects. We have a lot of them. And I mean a LOT. It's about >120k of them. We're using https://github.com/Seneral/Node_Editor_Framework at the core of our node based tool and everything is a Scriptable there. Canvas is an SO, it containes Nodes which are SO as well and they contain Knobs which are Scriptable Objects too. All of this instances are saved in Canvas scriptable object, meaning that most of our Scriptable Objects have multiple instances of scriptable objects inside them (and i mean instances not references to them)
     
    codestage likes this.
  24. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Thanks for all the details, @mathewp it will help a lot!

    I'll take a close look at that node editor and will try to reproduce the issues you have with Scriptable Objects.
    And will test performance and possible infinite dependencies loops with lots of SO.

    Over 120k SO - that's something I'd say! =)
     
  25. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    Hello,

    Where is the filters configuration file stored?

    For example, if I create a long list of filters, is that file stored somewhere so I can make a backup copy of it? (In case I hit reset by accident, for example.)

    Thanks,
    Adam
     
  26. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    I'm getting this error:



    Any ideas?

    Is there additional info I can provide that'd be helpful?

    Thanks,
    Adam
     
  27. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey @AdamKane

    Thank you for your questions and reports!

    It's stored at the ProjectSettings\MaintainerSettings.asset file.
    It seems to be a good idea to add export and import of the filters, so I just added it to my todo tasks, thank you!

    Oh, this does not look good, thanks for reporting this!

    Yes, could you please let me know Unity version you're working with?
     
    AdamKane likes this.
  28. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    Hi,

    I'm using Unity v2018.2.11f1.

    Here's where the exception is being thrown:


    It looks like my .asmdef unit test file might be causing the problem? I wonder if I could just remove the unit tests from the project as a quick fix?

    Thanks,
    Adam
     
  29. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Thank you a lot!

    This will be fixed in nearest update.

    Yes it should help, but you also can use this to keep your unit tests:
    Just add this line before 463 line (at your screenshot) at the AssetInfo.cs:
    if (references == null) return result;
     
    AdamKane likes this.
  30. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    Okay, great. Thanks.
     
  31. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    @AdamKane
    Actually this already was fixed in the current 1.5.1 release:

    upload_2018-11-4_2-3-3.png

    Could you please try updating Maintainer to the latest version to see if the issues still persists for you?
     
  32. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    Is there a way to include rather than exclude a project path? What I'm doing now is excluding all project paths, one by one manualky except for the one path I'm trying to examine at the time.
     
  33. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    @AdamKane

    Could you please clarify which module you're using?

    Issues Finder module has path includes.
    References Finder allows you to drag & drop desired folder or files to include only them.
    Project Cleaner does not have path includes since it checks usage from scenes in first place (among with few other assets which always get into the build).
     
  34. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    Hmmm... I was using v1.5.1, but I went ahead and deleted it and did a fresh update just to be safe. I'll take note what happens once I re-add the tests. Thanks.
     
  35. AdamKane

    AdamKane

    Joined:
    Dec 3, 2012
    Posts:
    134
    Thanks, I realized I should probably be using the references finder, and dragging a particular folder to only include it.

    For reference, what I had been trying to do was exclude all but the folder of interest here:

     
  36. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Thanks, also please let me know what version you see at the About tab if it will still reproduce.

    Actually it makes sense, to totally ignore all found garbage in all folders except some specific one(s). Yeah, I'm adding this to the todo list and consider adding includes to the Project Cleaner module too.
    Thanks!
     
    AdamKane likes this.
  37. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey all,

    Just wish to let you know new Maintainer version 1.5.2 was sent for review some time ago and more likely will not be reviewed and released on store this year (UAS vetting team went for vacations).

    Official release at the store will be followed by detailed official post with update highlights, but among many other changes, it adds support for Unity 2018.3 nested prefabs, so feel free to drop me your invoice in PM to get this version before official release if you have any troubles with Maintainer in Unity 2018.3.

    Have a Happy New Year and great holidays!
     
    AdamKane likes this.
  38. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey everyone, Merry Christmas and Happy New Year guys!

    I'm glad to let you know Maintainer 1.5.2 is live at the store now, bringing to you lots of improvements and fixes, focused on 2018.3 support.

    Update Highlights:
    • Unity 2018.3 Nested Prefabs support across all modules
    • Unity 2018.3 Unified Settings support for reveal feature
    • numerous Issues Finder module fixes and improvements focusing on more significant issues
    • plenty of fixes and improvements on common core and across other modules
    • global rewrite and refactor of common core elements

    Please, remove previous Maintainer version completely before importing this update.
    This update also raises price to the $30, to make it even 10 for each 3 modules it has, after 3+ years of free updates and support, and there are three "three" digits in this sentence =)

    Stay tuned for more updates and news, lots of great changes ahead!

    Here is a full change log:
    1.5.2
    - update project to Unity 5.6
    - refactor files and folders (don't forget to remove previous version)
    - add 2018.3 nested prefabs support across all modules (scan, reveal, etc.)
    - Issues Finder: rewrite core and focus on most important issues
    * ground-up rewrite and refactor of core
    * add missing references support for UnityEvent methods
    * add missing references search and reset in the project settings
    * add missing references search and reset in some scene settings
    * add missing scripts on ScriptableObjects support
    * improve UI of the settings part a bit
    * deprecate Duplicate Scenes In Build (not possible anymore)
    * deprecate Duplicate Tags (not possible anymore)
    * deprecate Undefined Tags (not possible anymore)
    * deprecate Empty Array Items as non-informative and annoying
    * deprecate Disconnected Prefab as non-informative and annoying
    * deprecate empty components as annoying and false positive-prone
    * always use precise mode for duplicate components search
    * fix group settings switch did't work with modern .NET 4.x compiler
    * fix missing references cleanup to reset reference file id too
    * fix inconsistent terrain issue reveal didn't unfold proper component​
    - References Finder:
    * refactor of core elements
    * add Exact Reference support for ScriptableObjects instances
    * add Exact Reference support for Tiles in Tilemaps
    * add support for nested LightingAssets
    * minor improve UI and usability​
    - add Unity 2018.3 unified settings window support
    - fix Maintainer window won't show up sometimes
    - fix Maintainer window icon won't show up sometimes
    - fix Maintainer settings change won't save on scene switch in some cases
    - remove some legacy code
    - improve and fix a lot of minor stuff across common core and all modules
     
    MechEthan likes this.
  39. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    985
    Is there a way to use Maintainer to export unused files (the files, themselves -- not a report) somewhere, then delete the ones in the project?

    Example:

    - Project/Assets/
    > someDir1/unusedFoo
    > someDir2/unusedBar

    Detect unusedFoo, unusedBar >> Export to Project/src/ >> Delete /Assets/unusedFoo and Bar

    Result would be Project/src/someDir1/unusedFoo + Project/src/someDir2/unusedBar

    If not, can anyone recommend an asset that does this well? Our project is 30gb and we need to get these src files outta /Assets, but it's hard to tell what's used and what's not.
     
    Last edited: Mar 19, 2019
  40. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @Xblade-Imperium42

    Currently there is no such functionality but I'm adding this to the wish list, this is a good gap to fill!

    For now, you can purge trash bin, make sure you have checked "Use trash bin" checkbox at the Project Cleaner and remove unused assets to to the Trash Bin. After removing, just move files from the Trash Bin to the desired folder.
     
    MrLucid72 likes this.
  41. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    Unity is crashes every time on Issues Finder stage 1/3 in Unity 2019.2 in my project.
    I unchecked all except missing scripts finder
     
  42. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey, @Deadcow_

    Unity Alpha is not supported, I'm sorry.
    I just can't follow every update with core changes to keep my assets working on alphas, they change too much too often at that phase.
     
  43. Deadcow_

    Deadcow_

    Joined:
    Mar 13, 2014
    Posts:
    135
    Got it, no problem) I love your asset anyway
     
    codestage likes this.
  44. paxtonmason

    paxtonmason

    Joined:
    Sep 17, 2012
    Posts:
    8
    Can Maintainer find animations with missing references (the keys in the animation window with yellow text)?
     
    codestage likes this.
  45. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey @paxtonmason,

    In case you mean such missing:
    upload_2019-4-5_0-33-30.png

    then answer is no, not yet - it's planned to add such missing detection in future updates but now it will not see it.

    Please let me know if you meant some other case and I'll check out if it's detectable now or it should be added to animation missings detection enchantments plans.
     
  46. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    985
    How come this doesn't seem to detect unused music/sfx? Am I setting something wrong?

    I'm trying to use the Project Cleaner and it's skipping a ton of known, unused items (mostly audio files):

    I currently have 10gb worth of Assets and only 2GB is confirmed in use:

    I filtered out the scenes I actively used, .dll extensions, and a few known folders. I know for sure that I have a ton of unused music and sfx:

    However, Maintainer only picked up about 300mb worth of files and almost none of the music/sfx:



    ______________________________

    PS -- the method you mentioned earlier to separate source works well: I ensure "Use Trash Bin" is checked >> Delete >> Rename my project /Assets dir from "Assets" to "Assets2" >> Go to trash bin and restore everything >> it now restores completely separate and keeps the hierarchy. I stash it somewhere as src files, then rename my "Assets2" dir back to "Assets".

    I just need the real bloaty audio files to be detected which ones are in-use and not and I'll be looking good
     
    Last edited: Apr 8, 2019
  47. codestage

    codestage

    Joined:
    Jul 27, 2012
    Posts:
    1,931
    Hey @Xblade-Imperium42,

    Did you tried to check references for your audio files with References Finder?
    If there are no references found, could you please show your filters for the cleaner module?
    Also, could you please share a path to your audio files relative to the Assets folder?

    Thanks!
     
  48. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    985
    Not yet -- I'll do that next.



    /Assets/__Ready/Audio
     
    codestage likes this.
  49. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    985
    Audio files show up fine when I clicked on my Audio dir and used "Find selected assets references" to show the ones currently being used. It doesn't seem like I can manipulate files from here, so I couldn't do an "inverted cleanup" (delete

    Also, here's the left side settings:



    EDIT: To clarify, it found SOME audio clips (about 100mb worth out of 3gb, where perhaps only a few hundred mb is actually used). Trying to see if there's a pattern, brb
     
    codestage likes this.
  50. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    985
    /Assets/__Ready/Audio/Music/Audionautix/MinorWithCricket.mp3 | Found within cleaner (Not used/referenced in project)

    /Assets/__Ready/Audio/Music/Audionautix/Whoopsy.mp3 | NOT found within cleaner (Not used/referenced in project)

    Unity 2018.3.41

    Attached a hierarchy example to use to test for repro. For some reason, 1 unused file was found, but another unused file was not (in the same dir). This is just one example out of about ~4.5gb that should've been found.

    ProjectRoot.zip: https://ufile.io/qkfve (8mb)

    EDIT: Link updated to include a meta file (just in case).

    EDIT 2: Found a null err when using Scan Project:

    Code (CSharp):
    1. <b>[Maintainer]</b> System.NullReferenceException: Object reference not set to an instance of an object
    2.  
    3.   at CodeStage.Maintainer.Cleaner.AssetRecord..ctor (CodeStage.Maintainer.Cleaner.RecordType type, CodeStage.Maintainer.Core.AssetInfo assetInfo) [0x00045] in C:\Repos\ToL\tol-game-win\i42-tol-win64\Assets\Plugins\CodeStage\Maintainer\Editor\Modules\RecordsBased\Cleaner\Records\AssetRecord.cs:94
    4.  
    5.   at CodeStage.Maintainer.Cleaner.AssetRecord.Create (CodeStage.Maintainer.Cleaner.RecordType type, CodeStage.Maintainer.Core.AssetInfo assetInfo) [0x00001] in C:\Repos\ToL\tol-game-win\i42-tol-win64\Assets\Plugins\CodeStage\Maintainer\Editor\Modules\RecordsBased\Cleaner\Records\AssetRecord.cs:53
    6.  
    7.   at CodeStage.Maintainer.Cleaner.ProjectCleaner.ScanProjectFiles (System.Collections.Generic.ICollection`1[T] results, System.Boolean showProgress) [0x0045c] in C:\Repos\ToL\tol-game-win\i42-tol-win64\Assets\Plugins\CodeStage\Maintainer\Editor\Modules\RecordsBased\Cleaner\ProjectCleaner.cs:409
    8.  
    9.   at CodeStage.Maintainer.Cleaner.ProjectCleaner.StartSearch (System.Boolean showResults) [0x000b8] in C:\Repos\ToL\tol-game-win\i42-tol-win64\Assets\Plugins\CodeStage\Maintainer\Editor\Modules\RecordsBased\Cleaner\ProjectCleaner.cs:114
    10. UnityEngine.Debug:Log(Object) (at ?)
    11. CodeStage.Maintainer.Cleaner.ProjectCleaner:StartSearch(Boolean) (at Assets/Plugins/CodeStage/Maintainer/Editor/Modules/RecordsBased/Cleaner/ProjectCleaner.cs:135)
    12. CodeStage.Maintainer.UI.CleanerTab:StartSearch(Boolean) (at Assets/Plugins/CodeStage/Maintainer/Editor/UI/Tabs/CleanerTab.cs:297)
    13. CodeStage.Maintainer.UI.CleanerTab:StartSearch() (at Assets/Plugins/CodeStage/Maintainer/Editor/UI/Tabs/CleanerTab.cs:291)
    14. UnityEditor.EditorApplication:Internal_CallDelayFuncti
    EDIT 3: Hmm, it's not just audio files -- I have a 740mb dir of UI assets where I probably only used about 50mb of them or less (more realistically about 10mb worth).
     
    Last edited: Apr 8, 2019
    codestage likes this.