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.
  2. Dismiss Notice

Missing childs on Prefabs

Discussion in 'UGUI & TextMesh Pro' started by Rodolfo-Rubens, Sep 9, 2014.

  1. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    I don't know if that was always like this or if I'm missing something, but now that I need some prefabs to create items on a grid I noticed this:

    On the scene view I have the child of my child:
    1.png
    But on the project view it is not listed:
    2.png
     
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Project view has always only shown the first children of prefabs (not children of children)
     
  3. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    Hi Phil, thanks for the reply. I never noticed this I think that's because I never needed these 'grandchildren', but now, as you can see I have my UI element prefab that I will instantiate in runtime (the Item Box) and I have my class ItemBox, what I want is to assign some objects that are children of children to some variables on these class while editing the prefab trough the Project view, I know I could simply drop the prefab on to the scene and make these on the Scene view but it would be a little more convenient to do this trough the Project view...
     
  4. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Id agree at times its nicer to do it in the Project view but at the same time it could make the project view even more cluttered than it already can be.
     
  5. JAKJ

    JAKJ

    Joined:
    Aug 17, 2014
    Posts:
    185
    So just don't open the extra levels? I mean...it wouldn't add any extra lines or anything. All it would add is triangles which you could just ignore.

    It's not really an issue, since you can instantiate, apply, and delete, so if the reason is "we have other things to do" then I agree, but I don't see the clutter point.
     
  6. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Its also a "we have other things to do"
     
  7. Rodolfo-Rubens

    Rodolfo-Rubens

    Joined:
    Nov 17, 2012
    Posts:
    1,196
    I understand and I agree, that's where a prefab editor window would be nice! I hope we get one when we also get the Nested Prefabs! :D
     
  8. JAKJ

    JAKJ

    Joined:
    Aug 17, 2014
    Posts:
    185
    Looking into UnityEditor.HierarchyType.Assets and UnityEditor.HierarchyProperty.Next(int[] expanded) seems like a possible profitable avenue. I would not be shocked at all if it were possible to create a custom editing window that would be more flexible/configurable and could be docked just for prefabs.

    If there's enough interest in it, I shall look into it and probably toss it up somewhere for people to use.