"
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.
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.
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.
Hope that reduces some of your error spam at least! Sorry I don’t have a more permanent solution.
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.
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
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.