Search Unity

Bug (Case 1284822) Unpacking prefab breaks reference remapping from nested child prefab to unpacked scen

Discussion in 'Prefabs' started by AlkisFortuneFish, Oct 13, 2020.

  1. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    As the title states, if a prefab is unpacked and nested prefabs inside it reference it, after reloading the scene the nested prefabs point at the original prefab asset, rather than the unpacked object on the scene. If the nested prefab is made dirty via some other means after unpacking, the problem does not occur.

    Reproduced on b6 and several other versions of Unity all the way back to 2019.3.2.
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks for the report @AlkisFortuneFish! We're looking it. Since it's not particular to 2020.2, I'll move the thread to the prefabs forum.
     
    AlkisFortuneFish likes this.
  3. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Thanks Leonhard, force of habit. :p
     
    LeonhardP likes this.
  4. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Hi,

    Would it be possible to file a bug report so we can reproduce the issue or share screenshots/video so we can see what is happening? Bug report is preferred.
     
  5. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Hey Steen,
    That was literally the first thing I did, the number is in the thread title!
    Cheers
     
  6. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    So sorry, I suck at reading :)
     
  7. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    We all do it!

    I just got a response from QA, this is already on the system as case 1151512. It has been in there for a while.
     
    LeonhardP and valarnur like this.
  8. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Ah thanks, I checked up on 1151512 and it has a reasonably high score, so we will get to that soon-ish
     
    LeonhardP likes this.
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
  10. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Thanks Steen. I just hope soon-ish doesn't mean another year and a half, as 1151512 has been up for that long and the workaround only works for the most trivial of cases.
     
  11. Mads-Nyholm

    Mads-Nyholm

    Unity Technologies

    Joined:
    Aug 19, 2013
    Posts:
    217
    @AlkisFortuneFish
    Your issue has now been fixed. A train of backports will soon take off...
     
    LeonhardP likes this.
  12. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    973
    Fantastic! :)