Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Resolved New Search in object picker restrict search to selected asset directory be default

Discussion in 'Authoring Dev Blitz Day 2023' started by Jes28, Jan 26, 2023.

  1. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    990
    Currently in object picker, old search or new one, when window open it show all assets from entire project that is infinite number of item to choose. Each time we need to scroll that big list to find what we need.

    In case of empty field (when no asses was assigned) we have no other option that show all asset of project.

    But in case of ObjectField with some referenced asset we can assume that User want to change referenced asset and that new asset will be in the same directory as previous (like choose another icon, or reference another mob...) so we can add directory filter that show only assets from that same directory on object picker open.

    In rare case when new asset in another directory user will just change or clear filter and search in entire project.

    So please add default directory filter in new search object picker.
    Or at least option in preferences for this behavior.
     
  2. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    128
    Hi @Jes28 ,

    This is a good suggestion. I will add it to our backlog.

    In the meantime here are some tips that could help you improve the Advanced picker workflow:

    - You can use the [SearchContextAttribute] (https://docs.unity3d.com/2022.2/Documentation/ScriptReference/Search.SearchContextAttribute.html) to specify an initial query for a specific object reference. Example you have a field that needs a material to be assigned and that material needs to have a specific names or specific properties you can use this attribute to control what initial query will be run.
     
    Jes28 likes this.
  3. sebastienp_unity

    sebastienp_unity

    Unity Technologies

    Joined:
    Feb 16, 2018
    Posts:
    128
    Alternatively, you can chose to use the AdvancedPicker which allows a lot of different filtering.

    the `dir=` filter allows you to specify a specific directory for the assets you are trying to pick.

    upload_2023-1-26_14-54-50.png

    upload_2023-1-26_14-54-55.png