Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int j = 0; j < subtipColumns.Count - 1; j++)
- {
- float totalHeight = 0f;
- int step = 0;
- while (step < subtipColumns[j].childCount)
- {
- RectTransform rect = (RectTransform)subtipColumns[j].GetChild(step);
- totalHeight += rect.rect.height + margin;
- if (totalHeight > topBorder)
- {
- rect.SetParent(subtipColumns[j + 1], false);
- }
- else
- {
- step++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment