LayoutGroup checks disabled ILayoutIgnorer components for their value

LayoutGroup checks in the CalculateLayoutInputHorizontal() call it the component has an ILayoutIgnorer Component, and then proceeds to check the ignoreLayout value of it to see if it should add or ignore the gameObject. The problem is that it doesn’t check if the ILayoutIgnorer Component is actually enabled == true

So the issue is that if you change the “Ignore Layout” value of a disabled component, it will affect the layout.

And ( connected with that ) interface ILayoutIgnorer is missing a bool enabled { get; } field to add the check

1 Like

Don’t really know what you want to achieve here, but you can just extend the logic to check if the component is enabled. Or filter the getComponents on only the enabled ones.

This is part of the UGUI package so I can’t do anything there - I’m reporting a bug.