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

Bug Prefab is attached to a gameobject instead of becoming a new gameobject in the scene

Discussion in '2020.2 Beta' started by Rowlan, Oct 26, 2020.

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,270
    When I take e. g. the default VFX prefab that comes with HDRP and drag the butterflies into the scene with a terrain, the VFX gameobject is attached to the terrain. If I have a grasspatch there, it would be attached to the grass patch.

    That's definitely not good :)
     
    Last edited: Oct 28, 2020
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @Rowlan,

    There's a new option to set up default parents for new GameObjects in 2020.2:

    Editor: Added "Set as Default" option to Hierarchy objects to allow setting a custom parent for objects dragged into the Scene/Hierarchy Windows and objects created via the GameObject menu.

    Could you please check if it's related to that? If not, please submit a bug report for it.
     
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,270
    I'm not aware of that feature, but I did find that menu option in the gameobject of the hierarchy itself. Or is this some global setting? Just to visualize the problem:

    dbug.gif

    You see the ButterFlies are added as child to the Terrain gameobject. But I want them as a separate one. More problematic would be if I'd drag it to a grass gameobject, then they'd become a child of the grass.

    Please let me know if there's another setting to try or if you want me to file a bug report. However that's not intended behaviour :) If I'd want it as child of the Terrain, I'd drag it into the Terrain hierarchy, not into the scene view. That would be much too inaccurate to position / parent correctly.
     
    Last edited: Oct 28, 2020
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi Rowlan, agreed, this doesn't feel like expected behavior - I'll check and see where this changed! :)
     
  5. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Note: "Set as Default Parent" doesn't appear to be activated (the "Terrain" item would be Bold in the Hierarchy), so I don't think that is the issue. Could you log a bug directly? (Help > Report a Bug) - thanks very much!
     
  6. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,270
    Yeah sure. I tried reducing the scene to the core. But noticed that it doesn't eg happen if I create a cube as prefab. It seems to affect the VFX prefabs (is VFX a prefab?) only so far.

    Gonna file a bug report nontheless and update this post with the bug number when it's done.

    Edit: Case Id is 1288444
     
    Last edited: Oct 28, 2020
    LeonhardP likes this.
  7. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Rowlan likes this.