Search Unity

Find References 2 - A powerful asset reference management tool

Discussion in 'Assets and Asset Store' started by thienhaflash, Mar 26, 2016.

  1. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    508
    I will have a check with Unity 2018.3 and issue an update this week
     
  2. rubeng

    rubeng

    Joined:
    Apr 20, 2013
    Posts:
    37
    Hi, is it possible to use Find References 2 via API, so that I can integrate the usedBy report to a custom tool in our game?

    In my personal case, I am making a tool that checks the folders that map to assetbundle-variants so that I can see if there are files that are not present in all variants, and want to add a usedBy column to the tool report.

    Thanks for any informatión.

    Rubén
     
    vietlab likes this.
  3. Fishing_Cactus

    Fishing_Cactus

    Joined:
    Nov 8, 2014
    Posts:
    24
    Hi @thienhaflash I love this plugin.
    in our project however, it's still too heavy to use :(
    This plugin increases the load time of playing in the editor by 15 seconds, even when the plugin is disabled

    After looking at the source code a bit, it looks like the plugin is still loading the cache, even if it's disabled!
    Could you please try to improve editor play time performance?

    Thanks in advance!

    Pieter
     
    vietlab likes this.
  4. Greyborn

    Greyborn

    Joined:
    May 26, 2016
    Posts:
    54
    That would be great, thank you!
     
  5. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    Hello @rubeng , the anwers is yes, the following code allows you to do so

    Code (CSharp):
    1. // import FR2 if needed
    2. using vietlabs.fr2;
    3.  
    4. if (FR2_Cache.isReady) //only valid when FR2_Cache returns true
    5. {
    6.      // Get the list of assets being used by guid
    7.      FR2_Asset.FindUsage(guid);
    8.  
    9.      // Get the list of assets using a guid
    10.      FR2_Cache.Api.Get(guid).UsedByMap.Keys.ToArray();
    11. }
    12.  
    13.  

    @Fishing_Cactus
    The next update should solved that for you, this got reported before and we've updated FR2 to improve that
     
  6. Greyborn

    Greyborn

    Joined:
    May 26, 2016
    Posts:
    54
    Any updated on when a fix for Unity 2018.3+ will be available? Thanks!
     
  7. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    @Greyborn I sent the updated version to your inbox, please check!
     
  8. Deusald

    Deusald

    Joined:
    Feb 11, 2014
    Posts:
    30
    @vietlab
    I have a problem in unity 2018.3.6f1. The buttons "X" and "Use" in tab "Duplicates" dosen't work.
     
  9. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    508
    @Deusald An updated package is on its way to the asset store fixing that. If you need it right away just send me a message or ping me on skype at @thienhaflash

    Thanks a lot for support us by buying this component!
     
  10. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    508
  11. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    508
  12. Rafarel

    Rafarel

    Joined:
    Jul 21, 2017
    Posts:
    168
    Hello there !

    I just bought myself FR2 and I'm making some tests to see how it work on a small project on Unity 2018.3.7f1 :)

    This sounds like a very good tool, but I had some weird behaviour, maybe it is normal, maybe it is a bug, I'll explain the cases.

    1- Scene Assets doesn't update dependencies

    I have a scene with a GameObject and a Monobehavior on it.
    If I select the Scene asset in the project view, FR2 tell me that the scene USES this script, that's OK.

    Then I add another script to the GameObject, save the scene, reselect the scene asset to see what it uses.
    The new Script I just attached to the GameObject is not on the FR2 list of the Scene asset dependencies.
    FR2 is enabled, I've done refresh, saved and played the scene etc ... the script do not appears on the scene assets dependencies list. If I select the gameObject on the hierarchy, FR2 shows me the GameObject dependency to the script so this one is OK.

    BUT if I delete the cache file and re scan the project, the scene will show its dependency to the script I've added.

    If I delete the script from the GameObject on the scene, the scene will still shows a dependency that does not longer exist. Same thing, I have to delete the cache.

    Sounds like there's an issue with scenes that does not refresh dependencies unless I clear the cache.
    Is it a normal behaviour ? Is it a bug ?

    2 - Addressables assets are considered unused

    This one is particular because I'm also testing and playing with the Unity's Addressables package that is in preview.
    It's a package that will replace assets bundles actual system if I understand it well.
    All my Assets that are marked as addressables and not referenced by any other assets are considered unused by FR2.
    FR2 certainly not taking this into account for now, I'm just curious about your feeling on this new package and how will FR2 behave in the future with Addressables ?

    Thanks for your work, I'm just starting playing with my new toy / tool :)
    Have a nice day.
     
    vietlab likes this.
  13. Rafarel

    Rafarel

    Joined:
    Jul 21, 2017
    Posts:
    168
    In fact every change I made to assets are not updated.
    If I reference something on something the dependencies are not updated at all until I delete the cache.
     
    vietlab likes this.
  14. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    Hello, we confirm that this is a bug and would be fixed in the next update (I will submit an update in 1-2 days). This bug is newly introduced since we applied a more aggressive algorithm on caching (more performance gain). Anyway It's been fixed and just waiting for final testings before submit to the asset store. PM me if it's urgency on your side, I can send you the updated package without waiting for the asset store update!

    I haven't used Addressable system before (we rolled out our own solution for internal use, hence never tried). We will absolutely add support for Addressable system in the update after this one.

    Thanks a lot @Rafarel for taking this far to report the bug and give us the chance to make it work better for everyone.

    Best regards,
    Thuan
     
    Rafarel likes this.
  15. Rafarel

    Rafarel

    Joined:
    Jul 21, 2017
    Posts:
    168
    You're welcome @vietlab it's a pleasure to works with great tools like FR2 !

    I'm watching this thread for next release announcements !
     
    vietlab likes this.
  16. thibautvdumont

    thibautvdumont

    Joined:
    Oct 6, 2015
    Posts:
    21
    @vietlab
    I got this plugin a while ago and liked it a lot. I tried to use it again in a new project with the latest final release of Unity (2019.1.10f1), but it output a bunch of errors as soon as you import it and thus is unusable :


    Assets/FindReference2/Editor/Script/FR2_Cache.cs(44,17): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Cache.cs(45,17): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Duplicate.cs(415,21): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Duplicate.cs(416,21): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Cache.cs(1176,34): error CS1955: Non-invocable member 'FR2_Cache.onReady' cannot be used like a method.
    Assets/FindReference2/Editor/Script/FR2_Cache.cs(390,41): error CS1955: Non-invocable member 'FR2_Setting.OnIgnoreChange' cannot be used like a method.
    Assets/FindReference2/Editor/Script/FR2_Cache.cs(404,41): error CS1955: Non-invocable member 'FR2_Setting.OnIgnoreChange' cannot be used like a method.
    Assets/FindReference2/Editor/Script/FR2_Cache.cs(1399,48): error CS0149: Method name expected
    Assets/FindReference2/Editor/Script/FR2_Cache.cs(1408,58): error CS0149: Method name expected
    Assets/FindReference2/Editor/Script/FR2_Ref.cs(300,5): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Ref.cs(301,5): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Ref.cs(321,4): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_SceneWindow.cs(66,13): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_SceneWindow.cs(67,13): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_SceneWindow.cs(69,13): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_SceneWindow.cs(70,13): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_SceneCache.cs(163,25): error CS1955: Non-invocable member 'FR2_SceneCache.onReady' cannot be used like a method.
    Assets/FindReference2/Editor/Script/FR2_Window.cs(91,13): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Window.cs(92,13): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Window.cs(94,13): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Window.cs(95,13): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_WindowAll.cs(118,13): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_WindowAll.cs(119,13): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_WindowAll.cs(121,13): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_WindowAll.cs(122,13): error CS0019: Operator '+=' cannot be applied to operands of type 'Action' and 'method group'
    Assets/FindReference2/Editor/Script/FR2_Duplicate.cs(427,49): error CS1503: Argument 1: cannot convert from 'method group' to 'Action'
    Assets/FindReference2/Editor/Script/FR2_Duplicate.cs(427,69): error CS1503: Argument 2: cannot convert from 'method group' to 'Action'
    Assets/FindReference2/Editor/Script/FR2_Duplicate.cs(428,17): error CS0019: Operator '-=' cannot be applied to operands of type 'Action' and 'method group'


    Running on MacOS. Do you have any idea ?

    Thanks
     
  17. pajamajama

    pajamajama

    Joined:
    Oct 22, 2012
    Posts:
    55
    @thienhaflash, just a suggestion.

    FR2 doesn't find references that are serialized using the new Addressables system. The new system doesn't use the typical guid to serialize references. It uses a special string address to lookup via whatever asset provider is being used.

    Thanks for the awesome work!
     
    ibyte likes this.
  18. serbalak

    serbalak

    Joined:
    Aug 30, 2019
    Posts:
    1
    Hello,

    I don't understand how can I remove all unused assets in the my project. When I clicking on "Unused assets" button I can only see all unused assets, but how can I remove them all?
     
  19. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    940
    Hi I am using this tool to help document projects. Is it possible to enable copy and past of the asset lists in the various views or perhaps export to csv or text file. It would really be handy to have this functionality.
     
  20. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    940
    In any view can I add a top level path with wildcard for all files underneath as a filter?
     
  21. rubeng

    rubeng

    Joined:
    Apr 20, 2013
    Posts:
    37
    Hi, we are using TexturePacker for our spritesheets and they work as a texture with multiple sprites inside, when using FindReference2 the reference work as if all the sprites where the same (actually it just uses the texture as an asset).

    Is there any way to find references to subassets? even if it is a slow operation.

    Thanks for any information, love your asset
     
  22. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    Hello @rubeng

    We are working on an update for FR2 to support references in sub assets & also support newer Unity systems like Addressable. We don't have an estimation yet but we will update you when we do

    Thanks a lot!
     
  23. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    Yes, it's coming in the next update. In the mean time, if you can send me a sample of CSV file format you want then that would be great!

    The filter exist for that exactly reason, you can just type the extension into the filter box

    Thanks a lot
     
    ibyte likes this.
  24. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    940
    On page one of this thread there is a screen shot of a scene which has FF2 enhancements to the Hierarchy view. I do not see that in my project? Was that support pulled or do I have something not setup correctly?
     
  25. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    508
    Hello, where did you see that? It might be another different asset that do enhancement on the Hierarchy panel.

    Thanks
     
  26. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    940
  27. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    940
    Are you going to revive Hiearchy 2?
     
  28. mendozaa265

    mendozaa265

    Joined:
    Aug 6, 2015
    Posts:
    3
    @thienhaflash Hey just a heads up the latest update of the plugin doesn't compile properly/open in Unity 2017 if someone is using .NET 3.5 as their scripting runtime version. It looks like it's because of the property auto initialization on line 92 of FR2_SceneCache.
     
  29. mendozaa265

    mendozaa265

    Joined:
    Aug 6, 2015
    Posts:
    3
    Also, could you shed light on how the ignore section is supposed to work? If I ignore a folder should that folder and all files just not be processed by Find Reference 2? I've done that and they all still show up in the unused assets section even though they're listed as ignored. It seems like even listing the individual file doesn't actually work either.
     
  30. PuzzledBoy

    PuzzledBoy

    Joined:
    Sep 9, 2014
    Posts:
    19
    Hi,Can I use FR2 to replace reference? ie.. find all materials refer to a shader A and change to a new shader B.
     
  31. PuzzledBoy

    PuzzledBoy

    Joined:
    Sep 9, 2014
    Posts:
    19
    OK I fount out how to use GUIDs panel to did that! But this panel has little difficult to understand and use.
    Anyway,Greate tools!
     
  32. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    940
    Hi I noticed that the panel which displays unused objects is not correct. I have scenes listed there that are definitely required and are also listed on the game objects used in the build. So I think you need to track this bug down. Thanks
     
  33. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,073
    Hi I will buy this asset if it can help me. But looking at the screen shots I'm not sure it will. I'm seeing that in detailed memory profiler, an audio clip has 5 references. The unity profiler shows me which scripts are "referencing" it but not the name of the field holding the reference in each script. These are complex script files for my Master Audio plugin. I check the inspector in debug mode and see no references.....

    Would this plugin give me additional info or no?
     
  34. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    139
    @thienhaflash I just bought Find References 2 to try to find instances of a prefab I want to replace with another.

    This prefab is located in various places throughout my project - both inside other prefabs and in various scenes.

    It seemed to find the instances alright, but as I swap them over with the replacement prefab, the "Direct Usage" under FR2 doesn't seem to change.

    Do I need to press something to refresh the cache or something?

    I'm running Unity v2019.2.17f1 on MacOS Mojave.
     
  35. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    139
    Correction - it seems to be updating the scene references but not other prefabs
     
  36. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    508
    @Colin_MacLeod I think the find & replace feature is not working well with the nested prefab unity introduced recently so I will need to check again. It should be working in next update. We will send you an early update when it's ready to see if it works for you.

    Thanks a lot for taking time to report it to me, it's very valuable!

    @jerotas We still not sure if FR2 work or not for your case because FR2 is based on GUID references, we will send you a trial copy so you can try it out yourself when it's ready. I can not promise anything for now but even if it's not working we will spend some times to find a solution for it!

    Thanks a lot @jerotas for interested in FR2!
     
    Colin_MacLeod likes this.
  37. Olivier-Tache

    Olivier-Tache

    Joined:
    Feb 27, 2015
    Posts:
    17
    Hi,
    FR2 is an amazing tool, thanks !
    Just one question : the "Unused Assets" tab does not show any asset located inside my Resources folder, is this intended ? When I browse this folder in Unity's Project tab, FR2 shows me that some assets are not used by any other, so I wonder why they don't show up in "Unused assets".
     
  38. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    @Olivier-Tache The resources folder contains assets that can by load at runtime by code and always be included in build so we can not (and should not) delete them!
     
  39. Olivier-Tache

    Olivier-Tache

    Joined:
    Feb 27, 2015
    Posts:
    17
    @vietlab this is what I thought but just wanted to be sure. Thanks for the quick reply !
     
    vietlab likes this.
  40. vietlab

    vietlab

    Joined:
    Sep 29, 2016
    Posts:
    8
    We've just submit the FR2 v2.5 to the asset store with many new features and improvements. Hopefully it will go through shortly!
    • Support Unity 2019.3
    • Support for legacy Atlas system (packing tag)
    • Support for AssetBundle
    • Export dependencies as CSV
    • 1-Click to remove all unused assets (with backup)
    • Bookmark feature
    • Complete UI/UX revamp
    • Many other fixes and performance improvements


     
    Last edited: Feb 9, 2020
    Greyborn likes this.
  41. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    51
    First of all let me say thank you, FR2 is incredibly useful!
    One thing it seems it does not "find" though is references to (Prefab) assets inside of timeline assets (GameObject reference in a PlayableBehaviour used in a PlayableAsset (clip) in a timeline asset). Would it be possible to add support for that?
     
unityunity