Search Unity

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

Feedback a common syntax for search is needed

Discussion in '2020.2 Beta' started by laurentlavigne, Oct 1, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    upload_2020-10-1_13-38-12.png
    As you can see in this screencap selection by name still requires a lot of click selecting
    in project there is less of that because there are search macros
    so I try the project keywords and to my surprise this does nothing
    upload_2020-10-1_13-39-10.png
    it would be beneficial to keep all the macros common throughout unity
     

    Attached Files:

    LeonhardP likes this.
  2. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Hi,

    Quick
    search will be fully integrated in 2021.1 and that type of query will be supported. I hope that will work for you.

    upload_2020-10-5_8-24-26.png

    upload_2020-10-5_8-25-14.png
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    In the shader search as well?
    particle doesn't return "particle/lit"
     
  4. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Not yet, but that is something we should do.
     
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    yeah if you can take over all search windows then we'll have a consistency, all assets could use that
     
  6. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Yep that is the mid term plan.
     
    laurentlavigne likes this.
  7. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    If we're unifying over Quick Search, then you seriously need to reconsider some things.

    Quick Search generally doesn't give hits on exact comparisons of strings for CamelCased words - so "FooBarFoz" doesn't hit assets named FooBarFoz, you have to search for "Foo Bar Foz" instead.

    That might make some sense in contexts where you manually type things, but for automated workflows it's an absolute disaster. I also keep getting tripped up by it when I'm copy pasting the name of an asset where I know the exact name, but not the exact path, where I have to go in and add spaces to the name to get the hit.
     
  8. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    This reminds me that since 2017.LTS search has regressed a lot: it used to be instant and now we have to wait a while as if we're on the web.
    I hope this gets fixed in your new integration 2021.1
     
  9. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    If you mean the delay, that the search waits a bit if you finished typing, then this change was on purpose. Just press Enter to trigger the search immediately.
     
  10. jonathans42

    jonathans42

    Unity Technologies

    Joined:
    Jan 25, 2018
    Posts:
    514
    Hi Baste, this has changed already since version 2.1.

    upload_2020-10-7_8-27-27.png

    You can even use regex now.

    upload_2020-10-7_8-28-22.png
     
    Bastienre4 and Baste like this.
  11. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I hardly see anybody other than programmers and perhaps tech-artists to use regex. While being a powerful tool, it's most likely one that's used rarely.
     
  12. JoNax97

    JoNax97

    Joined:
    Feb 4, 2016
    Posts:
    611
    Probably, but in those cases where you need it, it's a godsend, specially if your project has good naming comvetions
     
    jonathans42 likes this.
  13. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    What was the purpose?
    Any wait or extra input requirement is decrease in productivity unless there is conflict with other input. In the case of search there is no conflict with other input since typing already requires a click in the search field.
    [edit for clarity]
    On top of that the current implementation slows down fuzzy search to the point of making it cumbersome. fuzzy search= you know there are a few letters in a name not sure of the exact spelling so you keep pressing letters seeing what comes up and delete letters when the list is empty.
    I doubt anyone likes things to work slower with less flexibility.
    In conclusion the addition of a lag in search is a regression.
     
    Last edited: Oct 8, 2020
  14. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    Regex as an option I hope.
    the default should be the standard cmd/bash wildcards such as ? and *
    Additional functionalities can use illegal characters such as : | "
    the only additional functionalities that I'd like is NOT
     
    Peter77 likes this.
  15. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Most likely to prevent lag while typing.

    I believe that was for example an issue I often experienced with the hierarchy search.

    I wasn't able to type without interruption, because Unity started to search/filter while I was typing (after each new character), which is a blocking operation, causing to introduce a huuuge lag between each typed character.
     
  16. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,338
    You want the default to not be regex, but instead be bad almost-regex?

    Regex is really easy, I don't understand why people get up in arms about it all the time.
     
  17. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    The reason why regex cannot be default is because it uses legal character. Better than option is prepending the regex query with an illegal character like
    :Foo.+Bar


    Interesting, never had that in 2017.LTS. If that's the case on large project then async insta search like quicksearch is the best of both worlds.
    Out of curiosity how many assets did your project contain?
     

    Attached Files:

  18. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    707
    This famous quote has almost always been true when applied to my personal experiences with regex:

    Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.​
     
  19. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Why should OP's search query match at all, prefab is nothing. Those entries are of the type GameObject