Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Search Result is completely wrong for sprite assets

Discussion in '2021.1 Beta' started by castor76, Jan 31, 2021.

  1. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Searching assets for Sprite names (multiple mode types) results in completely not finding anything even if they exists or finds wrong ones . like :

    upload_2021-1-31_23-39-34.png

    Also I was assuming that not finding the correct sprites was because the editor was still building the index, but even after it has finished (which took very long time btw) the result was completely unreliable.
    2021.b4
     
    florianhanke likes this.
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    I've noticed search issues as well (which didn't exist prior to b4). Exact matching results not being in the list, or a number of results that don't match at all - also during Play Mode, after another scene loads, typing into the search box above Scene Hierarchy doesn't find objects in the scene that you can see right there in the hierarchy when there's nothing in the box.
     
  3. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    In Preferences -> Search you can revert back the Search Engine for Hierarchy and Project:



    We will revert back to the legacy search engine by defaul legacy_search.png for beta 5.


     
    mfatihbarut and adamgolden like this.
  4. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Perfect - confirmed that fixed both the Project search and the other issue. Thanks :)
     
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Right, is this mean that the new search engine has some problems? Or are we not using them properly?
     
  6. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Actually, the problem is that the new search engine do not necessarily yield the same search results as the legacy AssetDatabase.FindAsset depending on how you have setup your project indexes, etc.

    That said, we will try to make sure that the new search engine spew the same results as the legacy search engine as much as possible when used in the project browser context.
     
    laurentlavigne likes this.
  7. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Right, so what was the correct way to find the named sprites for the new searrch engine? Moreo er, how do we setup different ways of how search indexing is done for the project?
     
  8. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195
    I have a huge project (over about 200gb including the library), and the "Building assets serach index" Background task is taking forever (after 12 hours, it's at 9% and says its resolving 40381 artifacts), I remember that the quick search package had the option to set the indexing depending on the Project size. I couldn't find a similar option for Unity 2021.1, what should I do?
     
    florianhanke likes this.
  9. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    This look like a bug. In the background task window you can cancel the indexing process. Then you can try to open the Search Index Manager through: Window>Search>Index Manager and try to rebuild the index. You could also try to tweak some parameters, like exclude folders for things you absolutely do not want to index. You can also delete the default index if you do not need search indexing.

    If you can figure out which asset could be stalling the indexing process that would help us solve the issue.

    Thanks,
     
    florianhanke likes this.
  10. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    The setup window was removed in favor of creating a default index the first time you launch Quick Search. That said, it might not be ideally for large projects, so that is why we encourage users to open the index manager window and setup their indexes base on their needs.
     
  11. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195
    Ah ok, thanks, i will look into this. By the way, is there any way to limit the available performance for the background tasks (specifically the indexing in this case). As it is right now, Unity is unusably slow while the indexing is running, so it could just be a blocking task as well (like texture import). It would be really nice to give it 10-20% or so, as it's not super important to have the indexing completed right away. That way especially bigger projects like ours would really benefit from the fact that it's a background task.
     
  12. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Right now, the indexing requests are managed by the asset worker process which do not have any resource allocation threshold, but that would be a good feature request. I'll ask around if that would be possible.

    Depending on the version of Unity you are using, some improvements were made to limit the request batches under 500 ms each 3 seconds, but maybe these value should be tweakable by the user as a global preference.
     
  13. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195
    Hmm... well thats odd (or maybe even a bug?). I'm on 2021.1 and even the default limit of 500ms each 3 seconds should barely be noticable and in fact it's actually about 16% right? In my case it feels almost like I switched my workstation with a thin&light laptop (you know.. integrated graphics goodness..) and trying to run our HDRP next gen project on it... definitely doesn't feel like 16% :D
     
  14. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,060
    thank you so much!