Disabling layout groups on prefabs corrupts layout of prefabs containing them

Hi,

We have a complicated layout that was made using nested prefabs and they use horizontal and vertical layout groups to align UI items. I want to disable or remove these layout groups since they aren’t needed at runtime.
However, everytime I try to do this, the layout of the elements in prefabs (and scene) using them is completely corrupted. That is, their size becomes zero, or their alignment is way off… etc.
For some this can be fixed by reverting prefab overrides, but for others this doesn’t work. It’s really unpredictable and doing everything by hand is almost undoable since there are so many of them.

Anyone else encountered this issue? Know of a workaround?

Hi

  • Which version of Unity are you using?
  • When does this issue occur, is it when making a build that these corruptions occur?

2021.3.21f1

And no, it’s just in the editor. When switching from one prefab view (or to scene view) to another after disabling or removing layout groups.

Ok, thank you for the info. Can you submit a bug report on this? Sounds like you got some good reproduction steps for this.