예제 #1
0
        static Vector2Int ComputeMaxAllocSize(List <Area> areas, int rowHeightBias)
        {
            int maxWidth  = 0;
            int maxHeight = 0;

            for (int i = 0; i < areas.Count; ++i)
            {
                var area = areas[i];
                maxWidth  = Mathf.Max(area.rect.width, maxWidth);
                maxHeight = Mathf.Max(area.rect.height, maxHeight);
            }

            return(new Vector2Int(maxWidth, UIRUtility.GetPrevPow2(maxHeight - rowHeightBias) + rowHeightBias));
        }