Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug QuickSearch ObjectPicker is searching by full name (t:namespace.classtype), but no results

Discussion in 'Editor & General Support' started by Yuchen_Chang, Sep 15, 2022.

  1. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    126
    Hello! I've noticed that The SerializeField ObjectPicker can be set to use the new QuickSearch feature, and that really make me very happy!
    (QuickSearch can search components attached to an prefab asset's root GameObject, which is a super QOL feature :))

    However, when I tried to use it, the default search query is t:Namespace.ClassType, and no result will popup.
    type_search_with_namespace.png

    It seems like QuickSearch only accepts classtype-only searching, so if I delete the namespace part, the searching works properly.
    (expected search query: t:ClassType)
    type_search_without_namespace.png

    A simple work around is using
    [SearchContext("t:TheClassType")]
    attribute, this fixes the problem. But I appreciate that the default query could be t:ClassType only, so users don't need to add SearchContext to all serializeFields.
    (or maybe add a feature to search by full type name? It will be much better!)

    ※ My Unity Editor version is 2022.1.0f1. If it was a already-fixed bug, please forgive me
     
  2. sebastiengrenier

    sebastiengrenier

    Unity Technologies

    Joined:
    Jun 11, 2019
    Posts:
    96
    Hi! Yes, there is an issue with user types that are namespace qualified. Can you log a bug?
     
    Yuchen_Chang likes this.
  3. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    126
    Thank you for the quick reply!
    I've reported the issue by bug reporter just now, it's id is CASE IN-17203. I'm not bothered by this issue, so please don't feel any pressure.
    (but I'm looking forward the issue to be fixed!)
     
    sebastiengrenier likes this.
  4. sebastienp_unity

    sebastienp_unity

    Unity Technologies

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

    this bug is already fixed in the latest version. I will see to backport the fix/feature in 22.2. We do not backport these smaller not critical fix to 22.1 (unfortunately for you :) )

     
    Yuchen_Chang likes this.
  5. Yuchen_Chang

    Yuchen_Chang

    Joined:
    Apr 24, 2020
    Posts:
    126
    @sebastienp_unity
    Wow, I've never thought it would be fixed so fast! Thanks for the quick fix & response from you and the Unity Dev team.
    I constantly updates my project to newer Unity, so no problem :)b