Ejemplo n.º 1
0
 /// <summary>
 ///   <para>Returns the flexible size of the layout element.</para>
 /// </summary>
 /// <param name="rect">The RectTransform of the layout element to query.</param>
 /// <param name="axis">The axis to query. This can be 0 or 1.</param>
 public static float GetFlexibleSize(RectTransform rect, int axis)
 {
     if (axis == 0)
     {
         return(LayoutUtility.GetFlexibleWidth(rect));
     }
     return(LayoutUtility.GetFlexibleHeight(rect));
 }
Ejemplo n.º 2
0
        public static float GetFlexibleSize(RectTransform rect, int axis)
        {
            float result;

            if (axis == 0)
            {
                result = LayoutUtility.GetFlexibleWidth(rect);
            }
            else
            {
                result = LayoutUtility.GetFlexibleHeight(rect);
            }
            return(result);
        }