Currently - as I assume many of you are doing - I am setting the canvas size to the AbsoluteContentSize of any UILayoutConstraint when it changes.
Sample code of what that would look like:
UILayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
Frame.CanvasSize = UDim2.fromOffset(0, UILayout.AbsoluteContentSize.Y)
end)
Now this should work well and all, however, when I change the CanvasSize for some odd reason it causes the AbsoluteContentSize to update and therefore cause a infinite reentrance bug in my code (Studio catches this but it crashes in a live-game).
I was hoping that someone would have ran into this (as far as I am concerned I haven’t found something similar here on the DevForums nor on external-sources). Any solution would be great, cheers!
(Additional information that I forgot in the original post, NO none of the elements in the ScrollingFrame are dependent on the Y axis for scaling: However, the X axis is dependent and the Y axis does have a value of 1 on the scale so that the UIAspectRatioConstraint will work. I am also using a UIGridLayout with a UIAspectRatioConstraint parented to it and the CellSize set to {0.25, 0, 1, 0}).
