Search Unity

Official Quick Search Preview

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

  1. IAndrewNovak

    IAndrewNovak

    Joined:
    Nov 29, 2013
    Posts:
    118
    Hi. I find so critical bug. Unity 2022.1.20 HDRP 13.1.8
    I make game scene with many objects. After that, I try to find all hierarchy objects with monobech script.

    1. Put in filter:h: prefab t:mono
    2. Switch to Query builder mode and click to type|mono button
    3. Quick search and start cashing something (make dropdown I think)
    4. I have errors.
    5. After errors almost my level game object stays invisible and I can't switch it back
    Also, I has the invisible objects in new scene.

    My project is corrupted now :( Please help !

    Link to google drive with Editor log and Scene screen (I selected a few game objects)

    Update: I found the reason why the meshes were not displayed.
    My Scriptable Render Pipeline Settings (in Project settings - Graphics) will be empty.
    I think this field is clear after errors. After manually filling the field, my scene renderers stay visible.
     
    Last edited: Oct 21, 2022
  2. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    I will try to repro the bug on my side Andrew. Is it still happening on your side?

     
  3. IAndrewNovak

    IAndrewNovak

    Joined:
    Nov 29, 2013
    Posts:
    118
    Thank toy Sébastien. Yes, it's happened. I use legacy search for now.
     
  4. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Sorry Andrew, I should have ask this precision before:

    - Are you working with the Search Window (I suppose so, since you seem to be using the QueryBuilder)?
    - You could have been working from the Hierarchy integration of Search (Advanced).
    - Does the error happens in your project directly or on the HDRP template project (which would be easier to test for me :))
    - I will try to repro on my side using the last 22.1 release.
    - Alternatively do not hesitate to run the bug using the Bug reporter (Help-> Report a bug). It is often easier for us to track these tickets. If you decide to log a bug add as much reporting data as possible.


     
  5. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    I wasn't able to repro in the HDRP template project.

    I tried various queries in the scene using the QueryBuildeR:

    upload_2022-10-25_16-6-35.png

    From your log file it seems the DecalPRoject has thrown an exception while generating the preview. I cannot find how this came to be... If you have repro steps or if you log a bug with your project attached I will make sure to test it further.

     
  6. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,090
    Last edited: Oct 27, 2022
  7. IAndrewNovak

    IAndrewNovak

    Joined:
    Nov 29, 2013
    Posts:
    118
    Sorry for the long reply.
    I can't 100% reproduce the issue in the empty project (hdrp asset clear in random time) BUT I think the issue starts after a quick search try to add a component and calling the Reset function after showing the quick search main window or first-time use of Query Builder. You can watch GameObject:AddComponent call in Unity editor log file (empty project) bellow.


    I have an error in a situation where my UIHudCross component was added to a Canvas image in the scene and I search with a filter
    h: prefab t:mono in Query Builder.
    After that, I have an error in the public void Reset() function and my Project settings pipeline asset field was empty (in work project 100% | in the empty project with little chance)

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3.  
    4. namespace UGame.UI
    5. {
    6.     public class UIHudCross : MonoBehaviour
    7.     {
    8.         [SerializeField] private Image image;
    9.    
    10.         private Color _defaultColor;
    11.  
    12.         public void Reset()
    13.         {
    14.             image.color = _defaultColor;
    15.         }
    16.     }
    17. }
    Unity editor console error (empty project):
    NullReferenceException: Object reference not set to an instance of an object
    UGame.UI.UIHudCross.Reset () (at Assets/UIHudCross.cs:14)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)


    Unity editor log file (empty project):
    NullReferenceException: Object reference not set to an instance of an object
    at UGame.UI.UIHudCross.Reset () [0x00000] in D:\Projects\Temp\QuickSearchIssue\Assets\UIHudCross.cs:14
    UnityEngine.GameObject:Internal_AddComponentWithType(GameObject, Type)
    UnityEngine.GameObject:AddComponent(Type)
    UnityEditor.Search.SearchUtils:GetTypeIcon(Type&)
    UnityEditor.Search.QueryTypeBlock:SetType(Type&)
    UnityEditor.Search.QueryTypeBlock:.ctor(IQuerySource, String, String, QueryListBlockAttribute)
    System.Reflection.RuntimeConstructorInfo:InternalInvoke(RuntimeConstructorInfo, Object, Object[], Exception&)
    System.Reflection.RuntimeConstructorInfo:InternalInvoke(Object, Object[], Boolean)
    System.Reflection.RuntimeConstructorInfo:DoInvoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    System.Reflection.RuntimeConstructorInfo:Invoke(BindingFlags, Binder, Object[], CultureInfo)
    System.RuntimeType:CreateInstanceImpl(BindingFlags, Binder, Object[], CultureInfo, Object[], StackCrawlMark&)
    System.Activator:CreateInstance(Type, BindingFlags, Binder, Object[], CultureInfo, Object[])
    System.Activator:CreateInstance(Type, Object[])
    UnityEditor.Search.QueryListBlockAttribute:CreateBlock(String, String, IQuerySource, String)
    UnityEditor.Search.QueryBuilder:CreateBlock(IQueryNode&)
    UnityEditor.Search.QueryBuilder:ParseNode(IQueryNode&, List`1, Boolean)
    UnityEditor.Search.QueryBuilder:ParseNode(IQueryNode&, List`1, Boolean)
    UnityEditor.Search.QueryBuilder:ParseNode(IQueryNode&, List`1, Boolean)
    UnityEditor.Search.QueryBuilder:Build()
    UnityEditor.Search.QueryBuilder:.ctor(String)
    UnityEditor.Search.QueryHelperSearchGroup:Add(ISearchQuery, QueryType, Texture2D)
    UnityEditor.Search.QueryHelperSearchGroup:Add(String, QueryType, Texture2D)
    UnityEditor.Search.QueryHelperWidget:PopulateSearches(IEnumerable`1)
    UnityEditor.Search.QueryHelperWidget:.ctor(Boolean, ISearchView)
    UnityEditor.Search.QuickSearch:CreateQueryHelper()
    UnityEditor.Search.QuickSearch:get_queryHelper()
    UnityEditor.Search.QuickSearch:DrawQueryHelper(Single)
    UnityEditor.Search.QuickSearch:DrawHelpText(Single)
    UnityEditor.Search.QuickSearch:DrawItems(Event, Single)
    UnityEditor.Search.QuickSearch:DrawPanels(Event)
    UnityEditor.Search.QuickSearch:OnGUI()
    UnityEditor.HostView:InvokeOnGUI(Rect)
    UnityEditor.DockArea:DrawView(Rect)
    UnityEditor.DockArea:OldOnGUI()
    UnityEngine.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
    UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
    UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint()
    UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh(DrawParams, Single, Exception&)
    UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain(RenderChainCommand, Material, Material, Texture, Texture, Single, NativeSlice`1, NativeSlice`1, MaterialPropertyBlock, Boolean, Exception&)
    UnityEngine.UIElements.UIR.RenderChain:Render()
    UnityEngine.UIElements.UIRRepaintUpdater:Update()
    UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase(VisualTreeUpdatePhase)
    UnityEngine.UIElements.Panel:UpdateForRepaint()
    UnityEngine.UIElements.Panel:Repaint(Event)
    UnityEngine.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel)
    UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent(Int32, IntPtr, Boolean&)
    UnityEngine.UIElements.UIEventRegistration:ProcessEvent(Int32, IntPtr)
    UnityEngine.UIElements.<>c:<.cctor>b__1_2(Int32, IntPtr)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

    (Filename: Assets/UIHudCross.cs Line: 14)

    [LicensingClient] Successfully resolved entitlement details
    C:\build\output\Unity-Technologies\mono\mono\eglib\gpath.c:115: assertion 'filename != NULL' failed

    Asset Pipeline Refresh (id=afbf3840294aef64d91a63bc89359a8c): Total: 0.016 seconds - Initiated by RefreshV2(AllowForceSynchronousImport)
    Asset Pipeline Refresh (id=18ed49df43f4b974fbdaf136f3c89cec): Total: 0.011 seconds - Initiated by RefreshV2(AllowForceSynchronousImport)
     
  8. blueteak

    blueteak

    Joined:
    Feb 19, 2013
    Posts:
    140
    It seems that the `[SearchContext]` attribute doesn't clear when the search window is closed, so using two different search contexts won't clear when the second one is selected for object picking.

    Simple example code with results image, clicking Search2 object picker, then closing it and clicking Search1 object picker, the Search2 context remains.

    Code (CSharp):
    1.     [SearchContext("Resources")]
    2.     public GameObject Search1;
    3.    
    4.     [SearchContext("Prefabs")]
    5.     public GameObject Search2;
     

    Attached Files:

  9. sebastiengrenier

    sebastiengrenier

    Unity Technologies

    Joined:
    Jun 11, 2019
    Posts:
    96
    Hi! This is by design but probably not the best workflow for pickers. We serialize search contexts so they can be restored in order to continue your search when you reopen the window. However, a context unique identifier is composed of the providers, the search flags and the types it is filtering in the context of an object picker.

    Therefore, when opening a picker on a field of the same type, with the same search providers and flags, we restore the previous context which is shared by both pickers, like Search1 and Search2.

    Can you log a bug and share it here? We will investigate further.
     
  10. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    I was able to repro this bug and it is fixed locally. Hope to backport it to 22.2 soon(ish).

     
    blueteak likes this.
  11. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Is there any way to search in the scene for things that reference other things in the scene?

    I can do
    h: ref:GUID
    to get all the things in the scene that references the asset with that guid. I can also to
    h: id:ID
    to find the GameObjects with that instanceID. But I can't find a way to combine them into something like "hey, which objects in the scene are referencing this other object in the same scene?".

    We can find this information now by either a) searching through the .unity file in a text editor or b) creating a SerializedObject wrapper for every object in the scene and searching through all of their SerializedProperty children, but both of those are slow and cumbersome, so something as convenient as
    ref:thing
    would be nice.
     
  12. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi Baste,

    We do not have a generic "ref" for scene object. Though the Dependency Manager prototype has some of these functionalities (see https://github.com/Unity-Technologies/com.unity.search.extensions and https://github.com/Unity-Technologies/com.unity.search.extensions/wiki/Dependency-Viewerfor more information).

    For example assuming a behavior like this:

    Code (CSharp):
    1. public class BehaviorReferencingGameObject : MonoBehaviour
    2. {
    3.     public GameObject obj1;
    4.     public GameObject obj2;
    5.  
    6.     // Start is called before the first frame update
    7.     void Start()
    8.     {
    9.        
    10.     }
    11.  
    12.     // Update is called once per frame
    13.     void Update()
    14.     {
    15.        
    16.     }
    17. }
    <properyname>=<asset>

    If you know the property that should contains the reference to your object you can do:

    Like this (with query builder):
    upload_2022-12-1_14-59-1.png

    Or like this (with text query):
    upload_2022-12-1_15-0-26.png

    Thanks for your feedback as always Baste.


     
  13. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    Hi!

    Thanks, that is good to know. What we were looking for were some way of solving the eternal problem of "something in this scene is deactivating this GameObject, but we don't know which script is responsible". In those cases, we don't know the property name, or really anything else than that the object has probably been referenced by something.
     
  14. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,065
    Bit OT but here's how I usually tackle these cases: Deactivating a game object or disabling a script is done in-line with the originating call. So you can put a log in or break on the script's
    OnDisable
    message and the stack trace will tell you the offending call site. With the debugger you can just check up to stack for which instance it is, otherwise you can add a
    Debug.Log("message…", this);
    to the offending script to narrow it down.
     
    JoNax97 likes this.
  15. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    322
    Where to add this don't see a preview package for it anywhere in 2022.1
     
  16. sebastiengrenier

    sebastiengrenier

    Unity Technologies

    Joined:
    Jun 11, 2019
    Posts:
    96
    Hi! Since 2021.1, QuickSearch is no longer a package and is a built-in module. You should be able to access it through the menu "Window/Search/", and there is now a Search button in the Toolbar (with predefined shortcut "Ctrl+K"):
    upload_2022-12-6_13-31-46.png
     
    Slashbot64 likes this.
  17. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    322
    aah.. and there was me thinking there was no quick search built in because I found some documentation on unity saying "To launch Quick Search use the Alt + ' shortcut" ... :/ and that didn't work.
     
  18. Slashbot64

    Slashbot64

    Joined:
    Jun 15, 2020
    Posts:
    322
    Can you make the hotkey Ctrl-K close the window if it is already opened.. would be useful...can ctrl+k ..search.. ctrl-k close it out the way.. on the off chance what I search for had nothing to click on or go to.. being able to just get rid of the window with the same shortcut is useful.. can have the shortcut icon.. a held down icon to shows its already opened somewhere.
     
  19. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    The quick search window is a game changer as it is a whole new way of interacting with project data.
    Sadly I encountered a lot of problems and errors while using it.
    I got the feeling that this feature is so unknown and underused that some pretty obvious errors slipped through.

    I did already report some of this through the Unity bug reporter but I am unsure if all of these are bugs or if I did sth wrong (for example with indexing)

    - "has:" filter does not work (https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-30810)
    - "p:" does not work ("t:SceneAsset" shows 172 project assets "p: t:SceneAsset" shows 0)
    - "t:SceneAsset" (172) works but "t=SceneAsset" (0) does not
    - Grid views lost all their columns after closing and reopening Unity although the docs state that they should be persistent
    - Prefab change indicators (blue bars) are shown left on the left border of the search window instead of the left border of the search windows inspector.

    I am using Unity 2021.3.16f1 and these are my indexing settings:

    upload_2023-2-6_14-6-32.png

    upload_2023-2-6_14-7-14.png

    Also unsure if I need both of these indices or if one with all options checked would be enough.
     
  20. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi @peaj_metric,

    Most of these issues are fixed in the latest 22.X.

    I will validate all those issues in 21.3 and see what can be backported. I should have some more details tomorrow.

    Thanks for the feedback,

    Sebastien


     
    peaj_metric likes this.
  21. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi peaj_metric,

    I did a few tests in our latest 21.3.X:

    - All usages of `p:` to enforce looking into the project seems to work fine:

    upload_2023-2-7_11-17-41.png

    Not sure what is bad on your side :(

    - `has:` filter has been consolidated with `t:` so effectively t: is used for anything "type" related. Components, assets types, GameObjects

    upload_2023-2-7_11-19-47.png

    - I did a few tests with Column setup for table view. If I save the query on disk using the diskette icon:

    upload_2023-2-7_11-22-30.png

    Then close the searchwindow and double click on the query on disk:
    upload_2023-2-7_11-22-53.png

    My window opens with the same column layout. If you have repro steps for how the column configuration was lot feel free to post it.







     

    Attached Files:

  22. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Continue from previous message.

    Prefab change indicators (blue bars) are shown left on the left border of the search window instead of the left border of the search windows inspector.


    I am unsure what this means. Do you mean when looking at prefab on disk like in this view?

    View attachment 1193860

    Or do you mean the prefab modifier is NOT shown in the embedded inspector?

    upload_2023-2-7_11-28-14.png

    Compare to what it should be in the normal inspector?

    upload_2023-2-7_11-28-52.png

    I just notice this myself. I will see why the embedded inspector doesn't draw those markers.

    I encourage you to continue using the Search Window. In 22.X we have built a Visual Query builder that makes it easier to craft complicated query and to explore que various filters available:

    upload_2023-2-7_11-30-55.png


     
  23. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    The blue bars are actually in your image. Just not where they are supposed to be. Have a look at the left edge of your search window ;-)
     
    fherbst and Baste like this.
  24. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    Thanks for digging into it. As I said I really love the search window and I am sure I will get a lot out of it when it works for me.

    If you do have access to this Bug report (https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-30810) I uploaded my index files. Maybe they help in reproducing the issue.
    Not sure if they work properly without the full project.

    Thanks for clearing that up. I did not understand the difference betweem "has" and "t" after discovering it can filter by component.
    Maybe the docs should be updated to state that "has" should not be used anymore.

    I will try to reproduce this issue.
    This is a really important feature to me and I setup some nice tables for my Game Designer before I lost it all :(
     
  25. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    I just created the columns again and saved it both to the existing project search file and to a user search, closed Unity and after opening Unity again all the columns are lost.

    After creating the columns these were the only changes to the search file:
    upload_2023-2-8_10-51-35.png
    Those changes do not seem to contain any info on the added columns.
    Here is the bug report: https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-31459
     
  26. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Trying to explore this new search and its functionalities and I have to say the first impression is not great.
    The tool seem to be full of capacity but the documentation is really lacking.
    Especially I tried to do a custom provider to sort and do actions on some specific assets of our project, and the examples to do so are not great. It would benefit for a sample that is working as-is so that we can dig into as the whole setup for these classes is unlike anything else in Unity, so harder to just take a guess.

    Also some of the examples still refer to QuickSearchTool and old APIs ^^;
     
  27. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi khan-amil,

    Could you be more specific about which classes are badly documented? And which version of unity you are using? For 22.X we tried to ensure that all apis had working examples (see https://docs.unity3d.com/2022.1/Documentation/ScriptReference/Search.SearchProvider.html).

    That said writing a provider can be tricky at first.
    Our search-extensions package contains some more samples (https://github.com/Unity-Technologi...ns/tree/main/projects/ProviderExamples/Assets).

    About Quicksearch: it should have been scrubbed out of the doc. Quicksearch was the package. If you have an example, feel free to link it to me I will be sure to remove it.

     
  28. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    My bad totally. I tought the fix had been backported to 21.3. I will work on this asap and ping you when it is ready to ship.

     
  29. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    The bug is now fixed for 21.3. It is part of a pull request with other bug fixes. It should land in our release branch for 21.3 fairly soon and then make its way to you. Sorry about the delay. Keep the faith :)

     
    fherbst likes this.
  30. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    My first google search led me to the package version, then to the manual, not the scripting API.
    And this part is still referencing quicksearch. https://docs.unity3d.com/2022.1/Documentation/Manual/api-action-handler.html. It would be great if this section pointed to your github repo.

    We're still in 2021.3, we'll switch next week and I was waiting for that to get more in depth with our plugins. For now I got by with the editor github project, but as always a good chunk of the helpers and utility that are used are in internal classes.
     
  31. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    Wow. Thank you for the quick turnaround. Looking forward to use it :)
     
  32. pegorari

    pegorari

    Joined:
    Nov 19, 2009
    Posts:
    60
    Hi, I'm trying to use the scene/hierarchy search inside a PreviewSceneStage which is necessary for the tool I'm working on. But the search only returns the hierarchy/scene objects from the Main Stage.
    How to include the search to look for objects in the PreviewSceneStage hierarchy? I can't find any details on the docs.
     
  33. evyatron

    evyatron

    Joined:
    Jul 20, 2014
    Posts:
    132
    Not a bug but more of a feature request - could you make SearchQueryAsset not internal please?

    I want to have an editor window for example that lists all the art search queries in the project, but there's no way to find assets of type "SearchQueryAsset" cause that class is not accessible. That leaves me with hacky workarounds - the best I can do is AssetDatabase.FindAssets with the type written down as a string (whereas I usually use typeof()). Though then for the resulting assets I then have no access to their data (icon, query, etc.).
     
    Last edited: Feb 25, 2023
  34. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi @evyatron,

    Sorry for the late answer.

    We try to keep those types internal because they are often in flux and it makes it easier to avoid Deprecating/Updating APIs. That said, we could look if it make sense to make this class public.

    One thing you could do would be to use the SearchService.Request API with the query "t:SearchQueryAsset". SearchItems would be yielded and those search items generally have an icon, a description and some metadata.

    The API documentation page: https://docs.unity3d.com/2021.1/Documentation/ScriptReference/Search.SearchService.Request.html

    has a lot of examples on how to run an API search. Keep in mind Request is generally an "async workflow".


     
  35. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi @pegorari ,

    I will admit I am unfamiliar with PreviewSceneStage. I will try to test this workflow a and see why we do not return objects in this stage. We coudl probably add filters to help you narrow your search to this area. I will keep you posted.

     
    pegorari likes this.
  36. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi again @pegorari,

    can you give me more information on how your project is setup with PreviewSceneStage? If you can provider a tests project that is best. What I would like to know is:

    1- Which version of unity are you using
    2- What is the setup of your project and how PreviewSceneStage is used. Currently from my understanding the only class we have implementing a PReviewSceneStage are for the PrefabStage? Are you talking about using Search while in a prefab stage?
    3- What is the search workflow you are trying that is not yielding any results. I would like to have precise repro steps please :)

    From what I can understand are you:

    1- Open a prefab stage by double clicking on a prefab in Project browser.
    2- Trying to search the scene using the SearchWindow?

    Thanks for the clarifications. Also: do not hesitate to log a bug (Help -> ) (and maybe attach a project to the bug). This is easier for me to track and fix official bugs.

    Thanks ,

    Sebastien


     
  37. pegorari

    pegorari

    Joined:
    Nov 19, 2009
    Posts:
    60
    Hi @sebastienp_unity, I just submitted as a bug and attached the project:

    "IN-34480 - Quick Search does not work when using custom PreviewSceneStage"

    Thanks for your support!
     
  38. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Thanks for reporting.

    Just a heads up on how things will go from here:
    1- Our QA team will clean up your bug repro
    2- Eventually the bug will be transferred to me
    3- I will fix it in the current dev version and backport it hopefully to 21.3 (though 22.2 is more realisitc)

    And you will be notified about this when it is fixed!

     
    pegorari likes this.
  39. pegorari

    pegorari

    Joined:
    Nov 19, 2009
    Posts:
    60
    Awesome, thank you!
     
  40. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hey @pegorari just a small heads to tell you that the bug has been reproduced by our QA team and transferred to the Search team (mostly me). I should be able to fix it in the coming days and then the whole backporting process will start.

    Thanks for reporting.

     
    pegorari likes this.
  41. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,275
    Does this work recursively on scripts? eg finding everything that's connected to a selected editor script? find the monobehaviour, the gameobjects that use the monobehaviour, etc
     
  42. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi @Rowlan,

    In the Search Window the ref filter only find direct reference.

    The Dependency Manager Prototype can find recursive dependencies.

     
    Rowlan likes this.
  43. Off0

    Off0

    Joined:
    Feb 5, 2018
    Posts:
    8
    Hello,
    I ran into a problem today and I don't know what to do.
    I tried with the help of another developer to solve it, but at the end we cannot resolve it.
    So I tried in the index manager, "Build" and this not help to find prefabs in custom path.
    With this command it's nothing find it:
    Code (CSharp):
    1. p: ("Assets/Custom/") and (prefab:any)
    (I have prefabs in the nested folder "Assets/Custom/...")
    I'm using 2022.2.16 version of the Unity.
    I'll be glad for any information about it.
    Thanks
     
  44. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hello @Off_the_leash ,

    Try using this query:

    p: dir="Assets/Custom" prefab:any

    dir : this filter will only filter asset in a specific directory. in your original query the boolean operator "and" is not needed since implicitly a "space" between filters is assumed to be "and".

    Thanks for your feedback. Hope this helps.


     
  45. Off0

    Off0

    Joined:
    Feb 5, 2018
    Posts:
    8
    Sadly it's still not found it after once again rebuilding (reindexing).
    There is a screenshot:
    If you get any another idea I'll try it. :)
     

    Attached Files:

  46. msfredb7

    msfredb7

    Joined:
    Nov 1, 2012
    Posts:
    163
    Hi, I have some feedback. Apologies if it's already been posted/addressed, I didn't read all 18 pages of forum.

    When I search files by name, I think Folder Name should "score" less than file name. It happens very often that the results at the top of the list are not the ones I'm looking for, specifically because their director path contains a folder match.

    For example here, I'm looking for the bow item, but some audio assets are listed first. Any human would know that I'm probably looking for the prefabs since they have Item in their names, like in my search.
    upload_2023-5-8_18-40-40.png
    I think directory name matching should only be used to break equality between items that score the same with file names only.

    EDIT: Let me know if I should make a separate post and delete this.
     
    Baste likes this.
  47. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi @msfredb7 ,

    it is fine to post your question without reading the last 18 pages :)

    I fixed this recently (it should be available in 22.2, 21.3 in the coming weeks (it might already be in 22.2). Basically when filtering for Assets, we filter according to their name. This is similar to what the Project browser is doing. If you want to filter with a director name, you can use the "dir:Myfolder" filter.

    Thanks for the feedback,

    Sebastien

     
    msfredb7 likes this.
  48. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    201
    Hi @Off_the_leash ,

    Hum this is strange. I tested with Unity 22.2.21f. I don't rember if the the fix I made for the dir filter is in .16f1.


    upload_2023-5-15_14-9-20.png

    If you run the query:
    p: dir="Assets/Custom"
    do you get results? I just want to know if the problem is in the prefab:any filter or the dir filter. Alternativly does the query below yield any results:

    p: dir="Assets/Custom" t:prefab 


     
  49. Off0

    Off0

    Joined:
    Feb 5, 2018
    Posts:
    8
    I understand here is the result:


    For this fragment:
    p: dir="Assets/Custom" t:prefab 
    result is empty.

    So I'm going to updating to a newer version of Unity.
     

    Attached Files:

  50. Off0

    Off0

    Joined:
    Feb 5, 2018
    Posts:
    8
    Still persist after updating to version 2022.2.19
    This not works
    Code (CSharp):
    1. p: dir="Assets/Custom" t:prefab
    This works
    Code (CSharp):
    1. p: dir="Custom" t:prefab