Search Unity

Quick Search Preview

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

  1. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Do you mind sharing the project you are using with 2018.4 (or any other project that repro the issue) that include quicksearch in the manifest.json?

    I've created a new project with 2018.4.4f1 and I didn't get that issue. Here's the zip of the project. Can you try to open it and see if you still get the same error?

    ExCSS.Unity is related to UIElements USS files so I wonder if you have another plugin/package that could mess up with the *.uss files.
     

    Attached Files:

    Last edited: Jul 25, 2019
  2. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,265
    Thank you!

    My use case is currently this : I have a component which hold a string. I want this string to be quicksearchable instead of a path (with a new leading string like "qj:") and leads to the game object with this component. Also, it could do prefix/suffix so it works with 2018.3 new prefabs and overrides. For example, multiple instances from the same prefab has a problem with QS because name are the same. With prefix, I could modify only that and it would prefix all the label with what I want (which I linked in the prefab already, that could be the same) My game always have 2 instance of everything except that one is for the red team and one is for the blue team for example. This system would prefix "Red" and "Blue" label to everything. And I get only GO with the component, so only the important ones I jump to often.

    licecap.gif

    What I did is exactly like you said, I copied the whole scene provider code. There are some problems that static util classes are also need to be copied. And all required modifications needed for this :

    Code (CSharp):
    1.  
    2.                 var objectsWithLabel = objects.Select(x => x.GetComponent<QuickjumpLabel>()).Where(x => x != null && x.ExcludeFromSearch == false).ToArray();
    3.  
    4.                 //using (new DebugTimer($"Fetching Scene Objects Components"))
    5.                 {
    6.                     List<int> matches = new List<int>();
    7.                     var useFuzzySearch = objectsWithLabel.Length < k_LODDetail2 && context.categories.Any(c => c.name.id == "fuzzy" && c.isEnabled);
    8.  
    9.                     gods = new GOD[objectsWithLabel.Length];
    10.                     for (int i = 0; i < objectsWithLabel.Length; ++i)
    11.                     {
    12.                         gods[i].gameObject = objectsWithLabel[i].gameObject;
    13.                         var id = gods[i].gameObject.GetInstanceID();
    14.                         if (!componentsById.TryGetValue(id, out gods[i].name))
    15.                         {
    16.                             gods[i].name = objectsWithLabel[i].EvaluatedLabel;
    17.                             gods[i].rawname = objectsWithLabel[i].EvaluatedLabel;
    18.  
    19.                             // if (gods.Length > k_LODDetail2)
    20.                             //     gods[i].rawname = gods[i].gameObject.name;
    21.                             // else if (gods.Length > k_LODDetail1)
    22.                             //     gods[i].rawname = GetTransformPath(gods[i].gameObject.transform);
    23.                             // else
    24.                             //     gods[i].rawname = BuildComponents(gods[i].gameObject);
    25.                             // gods[i].name = CleanString(gods[i].rawname);
    26. ...
    First I have to replace both name and rawname because that seems to be what fuzzy search look at. I want my string to take place of the name, so I changed `null` on the `label` to `god.name` (which is modified to be my string) on the `provider.CreateItem`.

    Code (CSharp):
    1.             var item = provider.CreateItem(god.id, ~(int)score,
    2.                                            label: god.name, //changed
    3.                                            description: null, //kept
    4. ...
    Also while it works, it stopped highlighting in orange when anything not `null` is forced into `provider.CreateItem`. Not a big problem but would be nice if it still shows orange letters.

    This modification was done 2 times on the indexer's create item and the first create iterm.

    Lastly, the condition to rebuild was :

    Code (CSharp):
    1.             EditorApplication.hierarchyChanged += () => m_HierarchyChanged = true;
    2.  
    So this is not enough anymore, I have to also rebuild when any of my component was changed (in the case that it leads to searchable label change) or added/removed (need a rebuild to add remove entries). So I add OnValidate to my component with static bool as a bridge to the editor tools :

    Code (CSharp):
    1. #if UNITY_EDITOR
    2.         public static bool rebuildNeeded;
    3.         void OnValidate()
    4.         {
    5.             rebuildNeeded = true;
    6.         }
    7. #endif
    Then finally hack in an another criteria for rebuild :

    Code (CSharp):
    1.             onEnable = () =>
    2.             {
    3.                 if (m_HierarchyChanged || QuickjumpLabel.rebuildNeeded)
    4.                 {
    5.                     QuickjumpLabel.rebuildNeeded = false;
    6.                     componentsById.Clear();
    7.                     indexer = null;
    8.                     ...
    So what I want to say is filtering is certainly useful :

    • Perhaps some ways to tell scene provider to rebuild again other than hierarchy change is also needed.
    • Sometimes it is not a filter (keep or not), but I also want to change the entry's content that is showing / used for search. A good way in the long run that I believe, is to modularize the "collect all from open scenes or prefab stage" -> "index them on thread" logic that is currently baked inside scene provider, to something that is easily usable in 1 line in my own subclass. (So this class would appears mostly empty, but contains full scene search capability.) Became a static like the fuzzy search or string matching that is currently already open. Then this modular "fetch scene objects" method's output could be filtered or modified some item's name further based on custom logic before returning for the fetchItems delegate.

    ps. While I am building this plugin, I noticed that the asmdef is named "com.unity.quicksearch" , named like package.json convention instead of assembly convention. (e.g. "Unity.Quicksearch")
     
    Last edited: Jul 26, 2019
    SugoiDev likes this.
  3. TriNityKA

    TriNityKA

    Joined:
    Mar 19, 2019
    Posts:
    7
    Luckily fixing the issue was quite simple. During our upgrade to 2018.4 we had to recompile all our plugins and tools and a build script copied all dependencies into our Assets/Libs folder. For some reason, a few unity editor DLLs including ExCSS.Unity.dll. Once I deleted them, the compile error was gone :D

    Only thing that annoys now is the non-rebindable hotkey. ALT+' doesnt work on german keyboard layouts.
    Can you maybe add a bindable shortcut to the pre 2019.x Keys Manager?
     
  4. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Ok I have a better understanding of what you need. I'll sketch out something and get back to you for validation.

    Also, I'll fix the assembly name.

    Thanks,
     
  5. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Yeah this one is really annoying for 2018.4 since we do not have the shortcut manager in that version. Maybe what we could do for 2018.4 is map two or three different shortcuts to the menu item. Let me see what we can do about it.
     
    TriNityKA likes this.
  6. TriNityKA

    TriNityKA

    Joined:
    Mar 19, 2019
    Posts:
    7
    Something like Shift+N is nice as its similar to Resharpers Instant Search shortcut :D

    Anyways, your package is amazing. Working with it is sooooo much faster than using the search bar of the project tab.
     
    jonathans42 likes this.
  7. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    So here's what I have so far (you can test the attached project if you want, a new version of QuickSearch is embedded).

    So lets say you have a script component like so:

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public class QuickLabel : MonoBehaviour
    5. {
    6.     [SerializeField] public string EvaluatedLabel;
    7.     [SerializeField] public string[] Keywords;
    8.     [SerializeField] public bool ExcludeFromSearch;
    9. }
    10.  
    EvaluatedLabel will be used as the item label and the array of keywords will also be used to augment the search matches.

    So now you can easily extend the scene search provider like so:

    Code (CSharp):
    1.  
    2. using System.Collections.Generic;
    3. using Unity.QuickSearch.Providers;
    4. using Unity.QuickSearch;
    5. using JetBrains.Annotations;
    6. using System.Linq;
    7. using System;
    8.  
    9. public class QuickLabelSceneProvider : SceneProvider
    10. {
    11.     const string k_ProviderId = "quick_label";
    12.  
    13.     public QuickLabelSceneProvider()
    14.         : base(k_ProviderId, "ql:", "Scene (Quick Labels)")
    15.     {
    16.         // (Optional) We do not want any subfilters for this variant.
    17.         subCategories.Clear();
    18.  
    19.         // (Optional) Update the functor that will fetch initial objects to build the game object descriptors.
    20.         // The array of game objects returned here will be the only objects used to build the index and used to search results.
    21.         fetchGameObjects = () =>
    22.         {
    23.             var objects = FetchGameObjects(); // Get original set of scene objects
    24.             return objects.Where(o => o.GetComponent<QuickLabel>() && !o.GetComponent<QuickLabel>().ExcludeFromSearch).ToArray();
    25.         };
    26.  
    27.         // (Optional) Update the functor that will build the list of words/tokens/keywords that will be used to match results and build the search index.
    28.         buildKeywordComponents = (descriptor, objects) =>
    29.         {
    30.             var basePath = GetHierarchyPath(descriptor.gameObject);
    31.             var quickLabelComponent = descriptor.gameObject.GetComponent<QuickLabel>();
    32.             return $"{basePath} {quickLabelComponent.EvaluatedLabel} {String.Join(" ", quickLabelComponent.Keywords)}";
    33.         };
    34.  
    35.         // (Optional) Update the functor that will return the label used for display
    36.         fetchLabel = (item, context) =>
    37.         {
    38.             var descriptor = gods[(int)item.data];
    39.             var quickLabelComponent = descriptor.gameObject.GetComponent<QuickLabel>();
    40.             return !String.IsNullOrEmpty(quickLabelComponent.EvaluatedLabel) ? quickLabelComponent.EvaluatedLabel : descriptor.gameObject.name;
    41.         };
    42.     }
    43.  
    44.     [UsedImplicitly, SearchItemProvider] static SearchProvider CreateProvider() { return new QuickLabelSceneProvider(); }
    45.     [UsedImplicitly, SearchActionsProvider] static IEnumerable<SearchAction> ActionHandlers() { return CreateActionHandlers(k_ProviderId); }
    46. }
    47.  
    So basically you create a new SearchProvider by extending SceneProvider and you only overrides the parts that you want to behave differently (i.e. fetchGameObjects, fetchLabel, etc.). Functors that aren't overridden will behave just like the builtin SceneProvider.

    So once the custom scene provider is compiled, you'll see this in the filter window:

    upload_2019-7-26_12-50-3.png

    If you do not want the built-in scene provider anymore, you can disable it in the preferences:

    upload_2019-7-26_12-50-41.png

    Finally, if you search with "ql:argon", this custom search provider will first only fetch game objects with the QuickLabel component and then match the objects that contains the component Keywords specified in the search query:

    upload_2019-7-26_12-51-51.png

    In your custom scene search provider you can set m_HierarchyChanged to true at any moment to have the index and game object descriptors rebuilt.

    I hope it covers the basic things you want in order to create custom scene search provider.

    We'll put something similar for those who would like to create new custom asset search provider as well.

    Thanks,
     

    Attached Files:

  8. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    17
    Hi, just wanted to say the fix for unloaded scenes worked perfectly! Quick Search is awesome and its development looks healthy, keep it up!

    I have a question concerning the post above:
    If you keep the SceneProvider enabled and extend it for a different provider, will the search logic be repeated and result in wasted processing power? I would imagine that the SceneProvider has to traverse all objects in the scene in order to perform its search, so would the traversal happen twice?
     
  9. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Hi, you are right. The parsing and indexing of the scene will be repeated for each customization of the scene provider if we go with such an API. That said, it is the most flexible way to create a custom scene provider without having multiple scene filters conflicting with each others. I think the most important with this API is to have the functor fetchGameObjects returns a set of game objects as fast as possible so it doesn't block the UI, then the rest of the indexing and filtering is done asynchronously and should be responsive.

    Also that way, it is quick and easy to activate and de-activate a scene search provider. I'll continue to think about some other ways to allow custom scene providers. If you or someone else has a implementation to suggest please do and we will certainly consider it.

    Thanks,
     
  10. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,265
    Thank you! I didn't incorporate the new search modifier into my plugin yet, will provide feedback later. But I am back with one another search related problem.

    So currently it seems a lot of weight is given to recently activated items (searched and choose one of the context action?), but intuitively direct match should always win over them. Currently (1.3.2) it seems like the direct match loses.

    For example, there is a scene asset called GameSelectorArcade. I expected p:gameselectorarcade to show this at the top regardless of my search history. However, 3 other items won, and they are all that I just executed with Alt+R.

    licecap.gif
     
  11. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Try "game selector arcade" with spaces or "GSA". To be memory efficient with only index up 12 characters per word. So here "GameSelectorArcade.unity" generates these words: "game", "selector", "arcade", "gameselector", "gsa" "sa", "unity" and other variations... So if you use PascalCaseToNameFiles.something, then we generate words for those "pascal case to name files pascalcaseto something ...". So knowing how the index works, you can take advantage of this. So in your case above, many assets generated the word "gameselector" and stopped after 12 characters, so putting spaces in the search terms should fix it. We could add an options to index more than 12 characters, but then it would take much more memory, so I suggest that you take advantage of how words are generated for each entry/document and type these words separated by spaces. Typing many partially written words will also make the search work faster.

    So basically you can type in any order these words and you do not need to type them all. So if you are looking for GameSelectorArcade.unity, try this: "gam sel arc",or "unity gam sel arc" or even "uni ga se ar", etc.
     
    Last edited: Aug 5, 2019
    5argon likes this.
  12. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    502
    Today I noticed that the QuickSearch window remains blank and the following exception is logged to the console:

    NullReferenceException: Object reference not set to an instance of an object
    Unity.QuickSearch.Icons.LightenTexture (UnityEngine.Texture2D texture) (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/Icons.cs:70)
    Unity.QuickSearch.Icons..cctor () (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/Icons.cs:31)
    Rethrow as TypeInitializationException: The type initializer for 'Unity.QuickSearch.Icons' threw an exception.
    Unity.QuickSearch.Providers.DocScriptingHelper..cctor () (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/Providers/OnlineSearchProviders.cs:76)
    Rethrow as TypeInitializationException: The type initializer for 'Unity.QuickSearch.Providers.DocScriptingHelper' threw an exception.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Unity.QuickSearch.SearchService+<>c.<FetchProviders>b__65_0 (System.Reflection.MethodInfo methodInfo) (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/SearchService.cs:478)
    UnityEngine.Debug:LogException(Exception)
    Unity.QuickSearch.<>c:<FetchProviders>b__65_0(MethodInfo) (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/SearchService.cs:492)
    System.Linq.Enumerable:ToList(IEnumerable`1)
    Unity.QuickSearch.SearchService:FetchProviders() (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/SearchService.cs:471)
    Unity.QuickSearch.SearchService:Refresh() (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/SearchService.cs:162)
    Unity.QuickSearch.SearchService:.cctor() (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/SearchService.cs:106)
    Unity.QuickSearch.Providers.AssetRefreshWatcher:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Library/PackageCache/com.unity.quicksearch@1.3.2-preview/Editor/Providers/AssetProvider.cs:283)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    I'm not sure how to reproduce this issue, it simply happened today after opening my project. I'm using version control and had been deleting folders and reverting the deletion in source control afterwards and then after re-opening Unity (and rebuilding the library) the issue occurred.

    After closing Unity and re-opening, Quick Search works again. I don't think I did anything weird or unsupported, maybe the package cache has issues unrelated to Quick Search itself.
     
  13. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Did you grabbed quicksearch from GitHub and without Git LFS? It looks like the icon image file are empty, or something like that? Which version of Unity and Quick Search are you using?
     
  14. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    502
    I'm using QuickSearch 1.3.2 installed via the package manager in Unity 2019.1.8f1. When the error was logged I checked and saw that the Texture2D in code was indeed null, but the icons were still present in the folder at the specified path, which is why I thought it might have been something wrong with the package cache since the error disappear after closing and reopening Unity once more.
     
  15. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Ok interesting, I am trying various scenarios to repro. Meanwhile, I'll add a guard in LightenTexture so it is more resilient. I'll let you know if I find anything else.

    Thanks,
     
  16. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    502
    @jonathans42 I found a repro case:

    1. Disable "Auto Refresh" in the Unity General Preferences
    2. Create a new project and install Quick Search via the Package Manager
    3. Launch QuickSearch to confirm everything working without errors
    4. Delete the directory "Library/PackageCache/com.unity.quicksearch@1.3.2-preview" in the OS file explorer
    5. Press CTRL+R in the editor to refresh Unity
    6. Launch QuickSearch and notice warnings in the console about "null texture passed to GUI.DrawTexture"
    7. Quit and relaunch the Unity editor
    8. Launch QuickSearch and notice exception thrown in the console
    9. In the Project view under Packages/Quick Search/Editor/Icons notice the empty folder
    10. Press CTRL+R to refresh the editor
    11. Notice exceptions still being thrown when launching QuickSearch and take note of the icons folder now showing that the icons are in the correct place
    This should showcase the issue. However, I want to add, that I didn't delete my library when the error first appeared, but only reverted/changed assets via my version control system. I know this may sound a little obscure, but deleting the library should be supported in general; at least in the sense that I should be able to close Unity, delete the library, reopen it and all assets and packages are imported again correctly.
     
  17. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Ok I didn't know that was a common workflow. I'll test that and try to find a proper solution.

    Thanks
     
  18. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,265
    Hello, nice, now I know how things work I can consistently get it.

    I would like to ask about non-pascal cased case like "2P" for "two players", or UI / AI / GUI / ID / 2D / 3D, etc. that's a common abbreviation. I think currently it was not recognized as a word, so would be nice if it is able to in the future. For example, I cant get to this scene asset called "GameSelector2P.unity" at all.

    Screenshot 2019-08-15 13.40.47.png

    In VSCode, it is able to segment these kind of words. Though I don't know if it has a set of predefined exception words or some kind of algorithm is taking place.

    Screenshot 2019-08-15 13.43.36.png
     
  19. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Hi,

    I was in vacation for the last three weeks. We will release v1.4.1 as a verified package first and then, I'll add support to Quick Search what you requested. It should be available in >=1.4.2.

    Thanks for the feedback.
     
    Last edited: Sep 4, 2019
    5argon likes this.
  20. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Hi 5argon, this will be available in version 1.4.2, here's a preview:

    upload_2019-9-4_16-29-48.png
     
    SugoiDev, 5argon and Baste like this.
  21. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,276
    Hi! Loving this tool, It's allowed me to create a way nicer layout for working on the laptop!
    Just wondering, is it possible to rebind the shortcut on 18.4?
    Thanks!
     
  22. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Hi petey,

    Thanks for the feedback. Unfortunately 18.4 has no shortcut manager to remap the shortcuts. The best you can do with 18.4 is to create your own MenuItem function like so:

    Code (CSharp):
    1.  
    2. [UsedImplicitly, MenuItem("Help/Quick Search (Different shortcut) _&#o", priority = 9001)]
    3. private static void OpenQuickSearchCustomShortcut()
    4. {
    5.     QuickSearchTool.ShowWindow();
    6. }
    7.  
     
  23. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,276
    Thanks @jonathans42, I ran into some issues though.

    I'm getting this error for the Quicksearch tool -
    Code (CSharp):
    1. QuickSearchTool' is inaccessible due to its protection level (CS0122) [Assembly-CSharp]
    Also it doesn't like the UsedImplicitly part of the MenuItem -
    Code (CSharp):
    1. The type or namespace name 'UsedImplicitlyAttribute' could not be found (are you missing a using directive or an assembly reference?) (CS0246) [Assembly-CSharp-Editor]
    2. The type or namespace name 'UsedImplicitly' could not be found
    It's probably something simple but I couldn't figure it out :(
    Screen Shot 2019-09-10 at 9.02.52 am.png
     
  24. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Hi you do not need the UsedImplicitly attribute. Also make sure your script with MenuItem is under an Editor/ sub folder. Finally, make sure to update to the latest quick search version >= 1.4 to get all the new public APIs.

    You might want to specify the full namespace or use a using declaration, i.e.

    Unity.QuickSearch.QuickSearchTool.ShowWindow();
     
  25. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,276
    Hmm that's weird, sorry to be a pain. Is there anything else that stands out as wrong here?

    Screen Shot 2019-09-10 at 2.00.04 pm.png

    Screen Shot 2019-09-10 at 1.41.10 pm.png

    Code (CSharp):
    1. using UnityEditor;
    2.  
    3. public class MenuItems
    4. {
    5.     [MenuItem("Help/Quick Search (Different shortcut) _&#o", priority = 9001)]
    6.     private static void OpenQuickSearchCustomShortcut()
    7.     {
    8.         Unity.QuickSearch.QuickSearchTool.ShowWindow();
    9.     }
    10. }
    Still getting this error :confused: - Assets/Editor/QuickSearchTweak.cs(8,27): error CS0122: 'QuickSearchTool' is inaccessible due to its protection level
     
  26. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    17
    Same problem for me with
    QuickSearchTool
    : the class is internal. Wanted to create a shortcut to quickly access the scene provider only.
     
  27. oxysofts

    oxysofts

    Joined:
    Dec 17, 2015
    Posts:
    17
    Question: is it possible to not show a SearchAction if a certain condition fails? E.g. I would like to create SearchAction for a single type of asset. It seems we would need a new
    isShown
    handler to go along with
    isEnabled
    .
     
  28. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Hi, yes that is something we want to do. It will require a bit of API change, but we'll do this for the upcoming version.

    We'll also make sure `QuickSearchTool` is public. I was sure it was already the case.

    Thanks,
     
    petey likes this.
  29. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,276
    I was thinking, would it be possible to make the top search result selected automatically? So you could just type a few keys then press enter, rather than having to select the result manually.

    Also, is there a way for us to change the Quicksearch to public it in the meantime? Just checking, no stress if not.
     
  30. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    411
    upload_2019-9-17_13-26-4.png

    upload_2019-9-17_13-29-2.png


    We've been using it for a little bit for our larger project, and i'm disabling it for now. Creating and moving assets has become incredibly slow, the editor feels way more sluggish.
     
  31. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,222
    That's bad - the Quick Search should really not be doing stuff when it's not open!
     
  32. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Thanks for reporting. For sure this can be improved. Sorry for the trouble. I'll let you know when this gets fixed/improved.
     
    SugoiDev likes this.
  33. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Yes we'll make sure the next version has an API to spawn the UI through code.
     
  34. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    173
    Yep you are right, we'll make sure late initialization like these do not happen until you've started to use quick search between two domain reload.