Eonirr

Untitled

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