Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Runtime/Scripts/Layout/SmartFlowLayoutGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ public override void CalculateLayoutInputHorizontal()
if (m_StartAxis == Axis.Horizontal)
{
float min = GetGreatestMinimumChildWidth() + padding.left + padding.right;
#if UNITY_6000_6_OR_NEWER
SetLayoutInputForAxis(min, LayoutUtility.DefaultMaxSize, -1, -1, 0);
#else
SetLayoutInputForAxis(min, -1, -1, 0);
#endif
}
else
{
Expand All @@ -143,7 +147,11 @@ public override void CalculateLayoutInputVertical()
else
{
float min = GetGreatestMinimumChildHeight() + padding.top + padding.bottom;
#if UNITY_6000_6_OR_NEWER
SetLayoutInputForAxis(min, LayoutUtility.DefaultMaxSize, -1, -1, 1);
#else
SetLayoutInputForAxis(min, -1, -1, 1);
#endif
}
}

Expand Down Expand Up @@ -265,12 +273,20 @@ float SetLayout(int axis, bool layoutInput)
if (horizontal)
{
_layoutHeight = totalCross;
#if UNITY_6000_6_OR_NEWER
SetLayoutInputForAxis(totalCross, LayoutUtility.DefaultMaxSize, totalCross, -1, 1);
#else
SetLayoutInputForAxis(totalCross, totalCross, -1, 1);
#endif
}
else
{
_layoutWidth = totalCross;
#if UNITY_6000_6_OR_NEWER
SetLayoutInputForAxis(totalCross, LayoutUtility.DefaultMaxSize, totalCross, -1, 0);
#else
SetLayoutInputForAxis(totalCross, totalCross, -1, 0);
#endif
}
}

Expand Down
Loading