Search Unity

Asset Usage Detector - Find references to an asset/object [Open Source]

Discussion in 'Immediate Mode GUI (IMGUI)' started by yasirkula, May 31, 2016.

  1. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    557
    Why did it have to be me....I don't see it in the windows menu. Are you meaning the windows menu next to the help menu because it's not listed. I am using 2018.3.8f1.
     
  2. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    1,058
    It is located there. If there are any error messages in the console, you must resolve those errors first.

    editor.png
     
    SilverStorm likes this.
  3. drambaldi

    drambaldi

    Joined:
    Aug 9, 2018
    Posts:
    3
    Hello, after the last update was working but today it stopped to give results (always no results found). There is a way to delete the cached data?
     
  4. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    1,058
  5. pixelknight

    pixelknight

    Joined:
    Jul 12, 2011
    Posts:
    88
    Hey, great work so far on the tool... can't wait to use it.

    I've got it on Unity version 2019.2.2 and seem to be getting a crash bug no matter what asset I'm trying to search in the project view. Is there a fix available?

    Thanks again for the hard work put into this so far!

    InvalidCastException: Specified cast is not valid.
    Model.Unit.Equals (System.Object obj) (at <8efbdbeaeed1474b83928e86de15dabc>:0)
    System.Collections.Generic.ObjectEqualityComparer`1[T].LastIndexOf (T[] array, T value, System.Int32 startIndex, System.Int32 count) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Array.LastIndexOfImpl[T] (T[] array, T value, System.Int32 startIndex, System.Int32 count) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Array.LastIndexOf[T] (T[] array, T value, System.Int32 startIndex, System.Int32 count) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Array.LastIndexOf[T] (T[] array, T value, System.Int32 startIndex) (at <ad04dee02e7e4a85a1299c7ee81c79f6>:0)
    System.Collections.Generic.Stack`1[T].Contains (T item) (at <376e8c39bbab4f1193a569c8dbe4305c>:0)
    AssetUsageDetectorNamespace.AssetUsageDetector.SearchObject (System.Object obj) (at Assets/Plugins/AssetUsageDetector/Editor/AssetUsageDetector.cs:607)
     
    Last edited: Aug 29, 2019
  6. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    1,058
    Thanks for reporting this. I am unable to tell why this exception isn't caught by this catch block. Regardless, can you try applying the following script modifications to your project?
     

    Attached Files:

  7. pixelknight

    pixelknight

    Joined:
    Jul 12, 2011
    Posts:
    88
    Super! Seems to be working great. Its already saving a ton of time.. some friends wonder why this kind of functionality isn't standard.

    Great work!
     
    yasirkula likes this.
  8. drambaldi

    drambaldi

    Joined:
    Aug 9, 2018
    Posts:
    3
    Thanks, but removing the cache did not solve the issue.
    Actually I have reverted to the old version without cache. (slower but works ...)

    Let me know if you need some tests with the new version. In production we keep the old version meanwhile.

    Best Regards
     
  9. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    1,058
    I'm sorry to hear that. Can you tell what kind of a reference the current version of the plugin fails to find?
     
  10. drambaldi

    drambaldi

    Joined:
    Aug 9, 2018
    Posts:
    3
    Hello the asset was a Sprite linked directly in the Main scene and the issue is for sure related with the cache (old version works).

    The project is a production project with several branches and I switch branch quite often (may be related?). Strange thing: if I delete the cache nothing change.

    Let me know if you need some tests, in the meantime I am using the old one.
     
  11. josoka

    josoka

    Joined:
    Mar 22, 2019
    Posts:
    5
    THANK YOU

    you're a life saver!

    Just what I needed!
     
    yasirkula likes this.
  12. yasirkula

    yasirkula

    Joined:
    Aug 1, 2011
    Posts:
    1,058