Eonirr

Untitled

Oct 26th, 2026
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. for (int j = 0; j < subtipColumns.Count - 1; j++)
  2. {
  3. float totalHeight = 0f;
  4. int step = 0;
  5. while (step < subtipColumns[j].childCount)
  6. {
  7. RectTransform rect = (RectTransform)subtipColumns[j].GetChild(step);
  8. totalHeight += rect.rect.height + margin;
  9. if (totalHeight > topBorder)
  10. {
  11. rect.SetParent(subtipColumns[j + 1], false);
  12. }
  13. else
  14. {
  15. step++;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment