Reproduction Steps
In my game just suddenly as of 1 hour and 50 minutes ago, all of my UI relying on AbsoluteContentSize broke.
The numbers returned appear to be either zero or very small, resulting in tweens and container sizes being wrong. This looks like a race condition because occasionally in the video uploaded below upon joining the game, the Favorites category is sized correctly and the images appear.
I do not have a precise repro case yet because I am at work, but this is completely breaking my game. Presumably a FFlag is involved.
The code that is going wrong through no change on my part is this:
buttons is a container for buttons that would normally be beneath headers in the Creatures tab of the UI shown.
-- Give the layout a minute to catch up (must give the grid room to expand before we clamp the size of the container)
buttons.Size = UDim2.new(
buttons.Size.X.Scale,
buttons.Size.X.Offset,
buttons.Size.Y.Scale,
100000
)
-- Resize containing frame
buttons.Size = UDim2.new(
buttons.Size.X.Scale,
buttons.Size.X.Offset,
buttons.Size.Y.Scale,
buttons.UIGridLayout.AbsoluteContentSize.Y
)
buttons.UIGridLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
buttons.Size = UDim2.new(
buttons.Size.X.Scale,
buttons.Size.X.Offset,
buttons.Size.Y.Scale,
buttons.UIGridLayout.AbsoluteContentSize.Y
)
end)
As far as I understand it, all users joining the game fresh are broken, but old users who have been ingame seem to be fine.
Expected Behavior
You should be able to see all of the buttons in my UI at the correct sizes.
Actual Behavior
UI is sized completely wrong and tween targets fall short. None of the buttons in my UI are visible because their containers have height 0. The second menu full of square floating buttons is supposed to swap offscreen.
Workaround
No workaround. This is breaking my game.
Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly
Date First Experienced: 2021-09-02 12:09:00 (-05:00)