Trying to add (layout rebuilder for) Display Area

Hey I’m getting the following error

"
Tring to add (LayoutRebuilder for) Display Area (UnityEngine.RectTransform) for layout rebuild while we are already inside a lout rebuild loop. This is not supported
"
I don’t quite understand what is meant by the error message, I have found people saying this may come from having multiple canvases or layout groups in a scene. I have only one canvas and it seems a little strange if unity’s layout groups simply don’t work.
Any description or help on this issue would be appreciated. The error occurs when loading scenes including startup.

Cheers

I have recently starting getting this error message as well. We have multiple canvases and many layout groups, but our project has always had those with no errors up to now - and it doesn’t seem to impact the functionality at all, just throws a bunch of errors to the console.

5.3 By the way

Still looking for help with this

having this error too. It Worked fine in 5.2 :frowning:

I’ve seen these errors before, and they seemed to come from the Scroll Areas I was using in my UI. To disable the errors, I made all the scrollbars in the scene either Permanent or Auto-Hide. It seems Auto Hide And Expand Viewport was causing this issue. I have no idea why, though.

2454162--168612--Image 008.png

Hope that reduces some of your error spam at least! Sorry I don’t have a more permanent solution.

4 Likes

Thank you. This cleaned my console.

Did someone already “Report a Bug” about this?

Outstanding! how do you come up to this?

Experimentation, mostly! I was getting this error a bunch:

Trying to add (LayoutRebuilder for) Content (UnityEngine.RectTransform) for layout rebuild while we are already inside a layout rebuild loop. This is not supported.

so I renamed all the objects named Content in my scene to various unique names. That helped me figure out the problematic elements pretty quickly. Then I figured that this error was happening when things were getting resized/rebuilt, so I just futzed with whatever control I could find that had to do with resizing/rebuilding things on the fly.

Bump.

All my ScrollRects are set to have permanent scrollbars, and I still get the error. :confused:

Try to fill “ViewPort” property in your ScrollRect as it expected in new version of Unity

I don’t have scroll bars but still getting this error. Any idea?

Yeah, I’m getting the error as well - no scroll bars, filling the ViewPort didn’t help… It’s saying this line of code is the cause of the error:
scrollRect.verticalNormalizedPosition = 0.0f;//scroll back to the top

Having this issue since 5.3 as well.
They’re working on it:

Going to download the patch release now to check if it’s fixed completely.

The patch fixed some of my errors, I’m still getting this issue on a UI.Text and UI.Image when I attempt to call SetActive(false) on their gameobjects.

For me, this issue has been fixed in 5.3.3.f1

Was having this issue due to a weird combination of layout elements and content size fitters. Upgrading from 5.3.2 to 5.3.4 seemed to fix it.

For me it seems like the Content Size Fitter is throwing the Exception

2622456--184202--Error1.PNG

wow, thanks for help @felixpk , i remove that component and the error was gone in console