Search Unity

Searching within prefab

Discussion in 'Prefabs' started by GearVR, Nov 21, 2018.

  1. GearVR

    GearVR

    Joined:
    Nov 13, 2015
    Posts:
    16
    Prior to 2018.3 I could search for anything in the Project sub-window and results would include objects within prefabs. Then I can drag that object into some script.

    Now with 2018.3 no results are returned from prefabs. Is this feature now no longer supported or is this another way?
     
  2. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Can you please file a bug report with clear steps to reproduce
     
  3. GearVR

    GearVR

    Joined:
    Nov 13, 2015
    Posts:
    16
    https://imgur.com/a/o2Drfdp

    Please look at this. I type 'product' to search. Objects like 'productName', 'productPrice' within the prefab 'productItem' don't show up in the search results.

    I recall that previously I was able to get them in the search results. I don't know if it's a bug or something I misremembered
     
  4. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    You are correct that this is how it used to work and you are correct that it does not work any more.

    We made this change deliberately. Having prefabs show the first level of children is a little odd, showing the full hierarchy in the project browser is not an option so we decided to only show the root in the Project Browser which also means that the children are no longer searchable.
     
  5. GearVR

    GearVR

    Joined:
    Nov 13, 2015
    Posts:
    16
    thanks. If you can expose even the first level children, that's sufficient for me. My use case is:

    I group hundreds of models into one prefab as a library (flat and linear grouping, not hierarchical). With an editor script I add scripts to each single model. Then I can drag them to other objects, at least prior to 2018.3.

    To simulate this behavior, now I have to break up this library prefab into hundreds of individual prefabs.