Search Unity

Bug Unity2021.2.18 cant destroy objects instantiated as children of parent object marked as "DontSave"

Discussion in 'Editor & General Support' started by Xtro, Apr 16, 2022.

  1. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    608
    Bug report: https://fogbugz.unity3d.com/default.asp?1420510_6cr8s3dj1err2op5
    Issue tracker: https://issuetracker.unity3d.com/is...get-destroyed-when-entering-a-different-scene

    Unity 2021.2.18 can't destroy objects which are instantiated as children of the parent object which is marked as "HideFlags.DontSave".

    This was working fine before 2021.2.x.

    Repro steps:
    1. Open Test scene.
    2. See that there is no Cube object in the scene view.
    3. Select "TestScript" object in Test scene.
    4. Enable "Test" component on that object. (This script runs in editor)
    5. See that this script created a "Objects" object and instantiated the cube prefab in it.
    5.a. See the cube in scene view.
    5.b. See that "Objects" object is created as "hideFlags = HideFlags.DontSave" in Test script.
    6. Create an empty scene via "File>New Scene" menu option.
    7. SEE THAT THE CUBE IS STILL IN SCENE VIEW!!!
     
    Last edited: Apr 22, 2022
  2. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    608
    I have received the most bull S*** response from Unity QA team: