Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. We are looking for feedback on the naming of a new user research platform that we are working on.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Quick Search Preview

Discussion in 'Editor Workflows' started by benoitd_unity, Feb 26, 2019.

  1. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Ok I'll keep an eye on this, but I think you can ignore it for now.
     
    SugoiDev likes this.
  2. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    This is not possible right now but it would be easy to support.I'll add it in the next preview version.
     
    SugoiDev likes this.
  3. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Quick 1.6.0-preview.3 is out if you wanna give it a try:

    - [UX] Remove search provider sub categories. It simplifies the search view filter window.
    - [UX] New scene provider filtering (added support for: id:<string>, path:<string/string> size:<number>, layer:<number>, tag:<string>, t:<type>, is:[visible|hidden|leaf|root|child])
    - [UX] Add the ability to fetch items on a specific provider.
    - [UX] Add support to override the default object picker using Quick Search
    - [UX] Add support for multiple asset indexes.
    - [UX] Add Search Engines for the upcoming Search API from Unity.
    - [UX] Add scene property filtering support (i.e. `t:light2d p(intensity)>=0.5`)
    - [UX] Add grid view support to display search results in a grid of thumbnails.
    - [FIX] The asset store provider will only be available for 2020.1 and newer.
    - [FIX] Support any characters in word searches.
    - [FIX] Fix Unity crash when dragging and dropping from quick search (1215420)
    - [FIX] Fix Progress API usage.
    - [FIX] Fix complete file name indexing (case 1214270)
    - [FIX] Add better support for startup incremental update.
    - [DOC] Quick Search 1.6 and higher will require Unity 2019.3 and higher.
    - [API] You can now override the string comparison options for word/phrase matching with the `QueryEngine`.
    - [API] Refactor SearchService to extract all the QuickSearch Window related stuff. Everything is driven by search context.
    - [API] Multiple simultaneous calls to SearchService.GetItems can now be done with different search contexts.
    - [API] Improved the build time of a QueryEngine search query.
    - [API] Allow removal of filters on the QueryEngine.

    You can try the improved scene search provider that now supports the following filters:

    word1..N (Filter objects by name)
    t:<type> (Filter objects by their type, i.e. collection of components)
    id:<instance id> (Filter objects by instance id)
    path:<parent/transform/to/child> (Filter objects ny their full transform path name)
    size:<number> (Filter objects by their volume size (using AABB))
    tag:<string> (Filter objects by tag)
    layer:<number> (Filter objects by layer number (i.e. 0..14))
    is:visible (Filter visible objects in main scene camera)
    is:hidden (Filter hidden objects in the hierarchy)
    is:leaf (Filter leaf objects, those without any children)
    is:root (Filter scene root objects)
    is:child (Filter objects with children)
    p(<property_name>)=<value> (Filter scene objects by their component properties)

    For most filters we support the following operators:

    :, =, !=, >, <, >=, <=

    and we support the following combine operation:

    or, and and - (for exclusion)

    Here's a few examples:

    image (5).png

    image.png

    image (2).png

    image (3).png
     
    SugoiDev and spaceemotion like this.
  4. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    331
    That seems wicked. How does it work?

    Edit: Just noticed the USE_SEARCH_ENGINE_API symbol.
    It seems we can't use it yet in the 2020.1 alphas, correct?
    Still, thanks for working on this! It is a much needed improvement.
     
    Last edited: Mar 1, 2020
  5. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    That will be for 2020.2 only since it requires native changes to the editor. You'll be able to replace many built-in search functionnalities using the Quick Search search engine (i.e. the scene and hierarchy toolbar search field, the project browser search and the object field picker).
     
    oxysofts, Jes28 and SugoiDev like this.
  6. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    331
    Man, I cannot express how hyped that makes me.
    I was thinking of "settling down" with 2020.1, but that's out of question now.
     
  7. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    637
    quick search can not find assets in project by partial name only by full name while project panel search filed can :(

    upload_2020-3-5_19-28-8.png

    upload_2020-3-5_19-29-39.png
     
  8. cg-adam

    cg-adam

    Joined:
    Jul 30, 2019
    Posts:
    44
    Can functionality be added so we can define what each asset type does? For example 99% of the time when I search for a prefab I want to "Select asset", but for a scene I want to "Open asset".
     
  9. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    You can not necessarily do it per asset type, but you can define the default action per search provider type:

    upload_2020-3-9_9-59-10.png
     
  10. cg-adam

    cg-adam

    Joined:
    Jul 30, 2019
    Posts:
    44
    Yeah I have seen that, ideally need it per type.
     
  11. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    99
    Small little addition that would be very useful: a context menu action for scene assets with additive loading.
     
  12. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Great idea! I'll add this for preview 1.6.0-preview.5 or 1.6.0-preview.6.
     
    oxysofts likes this.
  13. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    On its way:

    upload_2020-3-31_12-8-15.png

    You can add additional actions to existing providers like so:

    Code (CSharp):
    1.  
    2. [SearchActionsProvider]
    3. internal static IEnumerable<SearchAction> CreateActionHandlers()
    4. {
    5.     return new[]
    6.     {
    7.         new SearchAction("asset", "add_scene", null, "Add scene...")
    8.         {
    9.             enabled = (context, items) => items.Count == 1 && items.Last().id.EndsWith(".unity", StringComparison.OrdinalIgnoreCase),
    10.             handler = (item, context) => Utils.AddScene(item.id)
    11.         }
    12.     };
    13. }
    14.  
     
    oxysofts likes this.
  14. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    860
    I see that Quick Search is undergoing active changes, so here's some updated feedback:

    I had to disable the preview and in-window editing features because the window had become very slow even though my current project is very small. If they were super fast, I would probably give them a try, but currently they are making the window too laggy to work with.

    Also, I still think that the most basic feature, searching for an asset or GameObject by name is not right yet:

    QuickSearch_Longform.jpg QuickSearch_Shorthand.jpg

    It's nice that it uses a smart search algorithm that supports using only the uppercase letters in PascalCase words, e.g. finding "InGameDebugMenu" by typing "IGDM" or "dm". However, it simply must also work for partial matches I believe, e.g. "DebugMenu".

    I think I can summarize my feedback: I'd like Quick Search to be fast and quick to use. Complex queries and elaborate expressions are an interesting advanced features, but the basics needs to be top priority. At least in my team, we would like to use Quick Search to quickly find assets and GameObjects and then open them for editing.

    Thank you!
     
  15. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi Xarbrough and thanks for the feedback.

    If you do not like the search indexing or do not want to type "debug menu" you can always fallback to the AssetDatabase search which is slower and do not support property filtering. You can go in the preferences and select "None" for the asset indexing mode. We are still working actively on the search indexing and improve it every day, but we've made some choices to have the index be as efficient as possible in term of speed and memory. The search indexing does not do string.Contains to find matches as it can be very inefficient for very large projects. I would recommend splitting words with spaces as you type your search query, but if that is not an option, we can always add the option to do a final slow search to match anything in-between words.

    Are you using 1.5 or 1.6? You could always try 1.6 and let us know if it works better for you?
     
    Xarbrough likes this.
  16. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    860
    That works fine in my case. My project is relatively small so the search seems to be fast enough, but I do like the matching a little better this way.

    That also works, I may just have to get used to it.

    I've been using 1.6 already, but I think the previous two options are great for now. Thanks! :)
     
  17. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi Xarbrough,

    Can you try this build (https://drive.google.com/file/d/1Sm4MrfeOEY05UuUzPU5W5aY0-OZRIohw/view?usp=sharing) and let me know if you think it is better? I actually added a fallback to the asset database to find anything remaining that would be normally returned by a search in the project browser for example.

    39ff2300-7402-11ea-8d56-1e8ab097c32c.png

    I still need to validate what is the impact for large projects.
     
    Last edited: Apr 1, 2020
    Xarbrough and SugoiDev like this.
  18. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    860
    Thank you very much! Yes, the custom build works very nice in my project. My previous case now works the way I expected it and I can also search for e.g. "audio cardprefab" to find "CardPrefab_Audio.prefab". I like it and in my smaller size project (600 assets, small scenes) performance is good. I have only the basic search options enabled, though:

    upload_2020-4-1_21-45-57.png

    I've also did a few tests in larger projects (5000 assets, medium size scenes). Same, good results, fast performance. I had to delete a few lines of code to make it compile in 2019.2.17 though and then the keyboard shortcut and row selection highlights were no longer working, so I only did a short test there.

    So, from my point of view the fallback works great!
     
    jonathans42 likes this.
  19. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi, just note that Quick Search 1.6 will only be officially supported for 2019.3 and higher. In Quick Search 1.6 we use new extended styles from 2019.3 and we may rely on API that are not available before that.

    Thanks for your time.
     
  20. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    99
    Hi I just wanted to highlight that the keyboard UX on this popup is awesome!

    upload_2020-4-3_15-7-55.png

    I don't use this popup often so I'm not familiar with it, so I was surprised just now when the keyboard worked exactly how I expect it to: up/down, spacebar to toggle, all seamless. That's attention to detail, exactly what's needed for Unity these days!
     
    SisusCo and jonathans42 like this.
  21. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    99
    So happy to read this, those features have been unchanged in years. Meanwhile Quick Search has been progressing steadily and consistently, it will be a big refresh to these features.

    I have some questions related to this:

    - Will these use a regular Quick Search panel or will they be more tightly integrated to those search feature? e.g. A contextual popup connected to the relevant part of the screen, such as a search box in the project view.
    -Will these support the functionalities specific to these panels? For example in project view being able to search through only the descendants of the current folder.

    Thank!
     
  22. sebastiengrenier

    sebastiengrenier

    Unity Technologies

    Joined:
    Jun 11, 2019
    Posts:
    4
    It will be tightly integrated. In fact, it doesn't replace any UI except for the object picker. For the hierarchy and project browser search, the same search box is used for the legacy search and QuickSearch. We just redirect the search queries to the search engines you selected through the preferences. But that doesn't mean you are limited to what the legacy searches offered. You'll be able to type any queries that QuickSearch supports.

    For the object picker, it's a little different. If you select QuickSearch as the active search engine, the QuickSearch panel will open. However, if you select the default engine, the legacy object picker will open, but since this picker uses both the hierarchy and project search, you can still use QuickSearch as a backend if you set it as the active engine for those scopes.

    Yes, but they don't currently support them all at the moment, which is the case for your example. However, it should be fairly easy to add.

    Each search scope (i.e. Hierarchy, Project Browser, Object Picker) has its own context containing information related to the search, not just the query string. So we can pass the information we want to support those features. It's just a matter of adding that information in the context and supporting it in QuickSearch.

    You might have noticed that I have mentioned the words "Search Engines" several times now. To enable this feature, we introduced what we call the SearchService API. This API lets you register your own custom search engines to replace the legacy ones. We currently support three different "scopes" of search: Hierarchy search, Project Browser search, and Object Selector (aka object picker). QuickSearch uses this API to register itself as a search engine for those scopes. You can select which search engine you want to use through the User Preferences.

    NB: This is only available in 2020.2 and could potentially change.
     
    JoNax97, oxysofts and jonathans42 like this.
  23. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Quick Search 1.6.0-preview.5 has been released. Make sure to try the new indexing system for assets and scenes/prefabs. We'll post a video shortly to demonstrate all the new features.

    Here's a list of new things to try out.
    • Add create menus to create new indexes (#211)
    • Add prefab asset indexing support (#191)
    • Add scene import indexing support (#181)
    • Add support for multi-selection (EC-723) #205
    • Add support to pick components from indexed prefabs (1209899) (#196)
    • Add support to save search queries as project assets (#202)
    • Add support for concurrent search engine searches (#179)
    • Improve the details view for the selected item (#184)
    • Fix draw items layouting (1228144) #199
    • Fix re-import all scene and prefab indexing (#194)
    • Fix search field text scrolling and auto complete drop down (#201)
    • Fix tracking selection of item at index 1 (#182)
    • Rename ADBIndex to SearchDatabase (#180)
    • Skip unsupported filters (#186)
    And much more.

    The API is starting to stabilize and I would love to see some fun and useful custom SearchProviders from you guys.

    Here's a few ideas if anyone is interested in trying it out:
    • A provider to search graph view, such as ShaderGraph,
    • A provider to search versioning and collab data,
    • A provider to search entity data,
    • A provider to search asset bundles,
    • etc.
    Thanks,
     
    Paulo_Mattos likes this.
  24. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    I have pushed a small update with 1.6.0-preview.6 including a few hot fixes:
    • Fix create root index in quick search settings (1234357)
    • Fix result view layout issue when changing item icon size (1228144)
    • Fix object picker extended results when the search text is empty (only for 2020.2).
    • Add new glob: filter to find assets using case sensitive file globbing, i.e. glob:"**/Scripts/*.cs".
    • upload_2020-4-6_16-56-33.png
     
    Last edited: Apr 7, 2020
    Peter77 and Baste like this.
  25. glad

    glad

    Joined:
    May 10, 2014
    Posts:
    76
    Hi!
    Some feedback:
    It could be useful but for me it is not. May be it is because of shortcut. I press something and this context menu appears even if I am no in Unity Window. Moreover when I removed quick search from packages it continues chasing me. When I press something it shows a window that suggests me to install it. That's not good.

    2 questions:
    1. How to change shortcut for it ?
    2. How to remove it without being chasing ?

    Thanks in advance.
     
  26. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi, you can open the Shortcut Manager, search for "quick search" and remove any shortcuts.

    upload_2020-4-14_9-9-26.png
     
    Last edited: Apr 14, 2020
    glad likes this.
  27. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    53
    I just tested quicksearch preview 6 in Unity 2019.3 and for our project with 2GB of assets on an ssd it is unusable.
    Scene search time is between 86 and 1000ms, object search time is always around 400ms. This is the graph from the profiler:

    upload_2020-4-28_19-45-33.png
    It just hangs for a second or so

    Even if I disable all providers but the asset search it still takes between 35-50ms and lags noticably - the search box in the assets window is way faster.
    - I assume quicksearch happens in a foreground thread (which is bad)
    - I assume quicksearch does not cancel the previous search when entering a new character (gets worse when typing "very" fast)
     
    Last edited: Apr 28, 2020
    RaventurnStefan likes this.
  28. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi, first are you using an index or not? If you go in the preferences which type of indexing are you using?

    upload_2020-4-28_15-52-27.png

    I suggest you use Complete and create a basic index.

    Many search provider are doing asynchronous search, meaning that they return results on many frame.

    ~80 ms for a search is what we expect for the scene provider with a large scene (sorry if that is not fast enough for you):

    upload_2020-4-28_15-56-49.png
     
  29. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi Patrick, can you check if you feel less lags with this new version? Some scene query were optimized by 5x.

    https://drive.google.com/open?id=1tg23FP-qMrvx_p3RjRGSkKK8yefdHfJs
     
  30. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,175
    @RaventurnPatrick, I'd also recommend turning off the scene search by default. You can still use h: to search for things in the scene, but paying the price for scene search when you're looking for an asset isn't ideal.
     
    jonathans42 likes this.
  31. RaventurnPatrick

    RaventurnPatrick

    Joined:
    Aug 9, 2011
    Posts:
    53
    Hi, so thanks to @jonathans42 and thanks to the new update I can now use all the default providers (asset, scene, objects and so on) and it only takes 4ms with preview7 and some minor tweaks to the index (complete index). There is no lag now anymore whatsoever :)
     
    oxysofts and jonathans42 like this.
  32. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    44
    Hi, I apologize if this was already mentioned in the thread but if I open quick search using a keyboard layout with dead keys the first key I type for the search will be loaded with the apostrophe key (either forming a special character or prepending an apostrophe to the search, like so:

    Press alt + ' and the window will open normally:
    upload_2020-4-30_19-34-53.png

    Then type a letter that combines with the ' dead key (a in the example):
    upload_2020-4-30_19-36-23.png

    Or type a letter that doesn't combine with the ' dead key:
    upload_2020-4-30_19-38-3.png

    Can that be addressed?

    Other than that, the tool works perfectly! I'm loving it!


    Edit:
    I forgot to mention that I'm on a Windows environment.

    Also, I realized that this issue only happens if the shortcut is a dead key or a combination of alt or shift with a dead key. I set my shortcut to ctrl + ' and i'm good for now.
     

    Attached Files:

    Last edited: Apr 30, 2020
  33. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Thanks for the feedback.

    Do you get the same behavior in the project browser search field?

    In any case I'll try to repro and fix it ASAP.

    Thanks,
     
    Garrafote likes this.
  34. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    38
    In the meantime you can always remap QuickSearch shortcut to a key that is not a "dead key".

    upload_2020-5-1_7-3-10.png

    upload_2020-5-1_7-4-47.png

    Notice also, that we have other ways of popping quicksearch:

    - Contextual: if the current Unity editor window focused has a "contextual search provider" QuickSearch will open and only that Search provider will be enabled. Ex: in the current shortcut configuration if you use Alt + shift + C when the focus is on the Hierarchy, only the Scene Provider would be enable, allowing you to search only the scene. Similarly if the focus is on the Project browser Alt + Shift + C would only search using the Asset provider (only search for items in project).

    - Assets / Scene / Menu: we have actions that are not bound to any shortcut but that you could configure yourself to open QuickSearch with only the specified provider open. This way if you know ahead of time what you are searching and you remember the shortcut you can get to your results faster. Similar to Visual Assist where you have a shortcut to look for Symbol and another to look for File.


     
    Garrafote likes this.
  35. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    44
    Nope it works fine on the project browser.

    Thanks a lot =)
     
  36. Ziflin

    Ziflin

    Joined:
    Mar 12, 2013
    Posts:
    84
    Been trying to get this to work in Unity 2019.3 with Quick Search 1.6.0-preview-6 but can't seem to get it to work. Is there something simple I'm missing?
     
  37. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi,

    has:
    works if you build an asset index. Here are the steps:

    1. Make sure you are using the complete indexing mode.

    upload_2020-5-6_19-31-53.png

    2. Then create your first index:

    upload_2020-5-6_19-33-34.png

    upload_2020-5-6_19-34-6.png

    3. Then make sure your index is indexing properties

    upload_2020-5-6_19-35-25.png

    Or by editing the JSON yourself:

    {
    "type": "asset",
    "baseScore": 100,
    "options": {
    "files": true,
    "directories": false,
    "fstats": true,
    "types": true,
    "properties": true,
    "dependencies": false
    }
    }

    Finally you can run the following queries:

    upload_2020-5-6_19-38-21.png

    Without the asset indexes, you can still use t:<type>, but you won't be able to query the components that has a prefab.

    That said, in the scene, when you use t:<type> it will also find the scene objects which have component of <type> since the data is already available and it doesn't have to be indexed.
     
  38. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Here's the query to find all scene objects that have a spriterenderer component but not a collider component.

    upload_2020-5-6_19-43-22.png

    I guess you could question if for the asset provider has: property filter should be renamed to t: as well. That is something we might do in the future, but the idea was to make the distinction between indexed assets and scene objects.
     
  39. mattnewport

    mattnewport

    Joined:
    Jan 29, 2016
    Posts:
    15
    Just started looking at Quick Search (seems very useful so far) so I may be missing something but I can't find in the docs or in the thread here what the
    q:
    Queries Special Search Provider is for. Can anyone explain / point me to an explanation?

    query-filter-unity.jpg
     
  40. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi, yes many things in 1.6.0-preview are not yet documented :(. It will come.

    In that version you can now save queries as an asset. So when you have a query you like you can press the little star.

    upload_2020-5-7_14-23-33.png

    Once that is clicked you can enter some useful name:

    upload_2020-5-7_14-24-17.png

    You will end up with a new saved query asset:

    upload_2020-5-7_14-25-19.png

    Finally in quick search, if you have many saved queries, you can type q: to filter out these queries. When you select a saved query result, it will set the search text for you with that saved query text:

    upload_2020-5-7_14-27-47.png
     
    SugoiDev, Baste and mattnewport like this.
  41. Ziflin

    Ziflin

    Joined:
    Mar 12, 2013
    Posts:
    84
    @jonathans42 - I set it to Complete, Created a "Project" Index in the root Assets/ folder, and edited the JSON file and set "properties": true in it (I'm not sure where to find the "Search Index Manager" ?. But now when I do a search for say:

    t:prefab
    ^ This still shows ".asset" files, which seems wrong (unless I set "files":false in the index and then only .prefab files are shown). If I start typing more, say:

    t:prefab P
    Then the results show (correctly) my "Player.prefab" and "PlayerFollowCamera.prefab" files. However, if I keep typing:

    t:prefab Player
    Then the results now show the previous two prefabs plus (incorrectly) a prefab without "Player" in the filename, but with "Player" in it's directory name. Again, if I disable the "files":false option, then it works as intended. Maybe the issue is just that a file with the query in its filename should be higher in the results than one with it in only one of its directories by default?

    I'm unclear what "files":true does though because if I set it to false, I'm still able to just search for part of a file/path and it shows those results as expected for some searches. For others it does not. Searching for "Player" finds prefabs, directory names, and even script files. But searching for "World" (a MonoBehavior class) shows no results after typing "Wor" (or after typing the full name). There are directories, script files, etc with "World" in the name, so I'm still at a loss as to what's happening here since it's very similar to what "Player" should return.

    However, I'm still unable to get has: to work. I have a MonoBehaviour derived component class called "Area" which is in a few prefabs. If I search:

    t:prefab has:Area
    I get all the prefabs. Nothing I put after "has:" seems to filter the results as intended and "properties":true is set in the index. I've tried a few other components, but they all seems to have issues. And these are components added to the root gameobject of the prefab which is all we really need.

    Another question: is there just a simple way to have it show all files under (recursively) a certain directory. Like I'd love to be able to search for:

    Characters/
    or maybe this so it could find a directory with just a portion of it typed:

    /Characters
    or even

    d:Characters
    ..and it just show all the files that have a directory with "Characters" in it. I tried enabling "directories":true in the index, and that kinda works, but shows other files with the search in their 'filename'. Also trying to do "Characters/Player" doesn't work as the "/" seems to break searches resulting in no results.

    Because of this bug: https://forum.unity.com/threads/object-picker-does-not-see-prefabs-with-a-specific-type.222375/
    we are just trying to find a simple way to quickly filter prefabs and was hoping to get at least one of these two solutions to work for now.

    Thanks for the help!
     
  42. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi, I'll contact you in private Monday so we can see how to make it work for you.
     
    Ziflin likes this.
  43. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Quick Search 1.6.0-preview.7 has been released.

    Here's the list of thing included in that release compared to preview.6

    • [UX] New onboarding window to setup your indexes for your projects (it pop once per project)
    • upload_2020-5-8_19-36-2.png
    • [UX] Save Quick Search settings per project instead of globally for all projects. (see UserSettings/QuickSearch.settings)
    • [UX] Improve the saved search query workflow (less field to fulfill).
    • [UX] Add the total asynchronous time a query took for all provider sessions in the Quick Search status bar.
    • [UX] Add more error reporting for invalid queries with the QueryEngine.
    • [UX] Add new index manager to manage your project asset, prefab and scene indexes.
    • upload_2020-5-8_19-36-35.png
    • [UX] Add a search expression builder to create complex queries.
    • upload_2020-5-8_19-37-9.png
    • [UX] Add a compact list view.
    • upload_2020-5-8_19-37-46.png
    • [UX] Add "Show all results..." to maximize the amount results found. In example for the AssetProvider, if this is checked we try to find more assets by using AssetDatabase.FindAssets. This can be unchecked in large project where the asset database can be very slow.
    • upload_2020-5-8_19-38-24.png
    • [FIX] Optimize the search menu and scene providers (about 4-5x faster).
    • [FIX] Fix the search field initial styling and position when opening Quick Search.
    • [API] Add support for spaces inside nested queries.
    • [API] Add support for nested queries with the QueryEngine.
    • [API] Add support for a search word transformer with the QueryEngine.

    Lots a new features in this preview release. There shouldn't be any new feature until 1.7.0, so we'll continue to improve and fix what we have now in order to release 1.6.0 verified.

    Thanks
     
    SugoiDev likes this.
  44. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    You should not set
    files:false
    since this will skip all files to be indexed and therefore only
    AssetDatabase.FindAssets
    will return results.

    In the index options
    files
    means "index all file paths" and
    directories
    means "index all directory paths".

    In most cases you should keep
    files:true
    .

    When you type
    t:prefab Player
    , this will match all assets that are prefabs and that contains player anywhere in there file path (parent folders, filename and extension). If you have enabled properties indexing, you can type
    t:prefab name:player
    instead to only match prefabs and asset with their name starting with player.

    upload_2020-5-8_19-53-19.png


    upload_2020-5-8_19-54-43.png

    I hope that helped clarify a bit how properties indexing works.
     
  45. Ziflin

    Ziflin

    Joined:
    Mar 12, 2013
    Posts:
    84
    (I upgraded to 2020.1.0b8 and QS 1.6.0-preview.7 just to have the "latest.") And I ran the install wizard shown above and picked Medium + Extended to get everything. So here's an example of what I'm testing:

    upload_2020-5-9_11-56-18.png

    So while this is I guess correct in that they're prefabs that contain Player in their full path name, I expect to see results with "Player" in just their file name (i.e. "Player.prefab" and "PlayerFollowCamera.prefab") to rank higher in the list. This happens on almost every one-word query I make and it wastes a lot of time scanning the results to find ones with the word "just" in their filename and not path. It'd be nice also if the results that start with query string were ranked higher than those with the string inside the filename.

    Also it's worth noting that the first time I ran this query, "HumanFighterMale.prefab" appeared first. Then I ran it again to get a screenshot and now it's showing in the middle.

    upload_2020-5-9_12-6-0.png

    You can see here that I don't get the correct results or even autocomplete option when I try to type "... name:player". It's not showing the "PlayerFollowCamera.prefab" file here. (Both of these prefabs are in a directory named "Player", so not sure if that's messing with something, but I expected it to find both with this query. it's also not found just searching for "Player" by iteself.)

    With the latest preview/Unity build, the "has:" filter seems to be working as expected now, so that's great. I can now do "has:Area" and it will find all prefabs with an Area component. I did notice that "has:player" is returning both the prefab with the Player component and PlayerCharacter component. Was their a way to specify the query text should match as "whole word?" Something like: has:"Player" maybe? Or a general way to mean "starts with" or "ends with"? In our previous engine we could do something like search for: Player# where the # meant ends with. Or if it came first: #Player - then it must start with the text.

    Still not sure if there was a way to filter all files under a directory, but again that would be pretty helpful at times.

    Thanks again for all the help. It looks like it's going to be really useful!
     
  46. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,447
    Hey, this is an ace asset!
    I can't seem to get it to auto open a scene though :( Does this setting look right?
    Screen Shot 2020-05-14 at 11.29.59 am.png
     
  47. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Hi,

    Actually a scene is an asset, so you might want to select Open asset... for the asset search provider if want the actual scene to be opened instead.

    upload_2020-5-14_7-53-34.png

    Also note that there is an extra option for scene assets to add them to the current scene.

    upload_2020-5-14_7-53-7.png
     
  48. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,447
    Oh cool! That’s great thanks!
     
  49. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    5,175
    Here's a thing I keep running into:

    I start writing a search term. I spot the result I'm looking for, and start pressing the down arrow to scroll down to it. Due to the list updating in the background, the search result I was going down towards is now gone.

    When I start pressing down, that means that I want to interact with the currently visible list. Any chance to add an option to stop auto-updating the list if my selection is currently in the list?
     
  50. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    289
    Yes absolutely. At some point we thought that if a selection is made, but there is still some results pending, then new results should be added at the end of the list and not be sorted (i.e. based on its score).

    What do you think of that?
     
unityunity