Ejemplo n.º 1
0
        private bool IsHeightOver(UnityEngine.UI.Text label)
        {
            double preferredHeight = (double)label.get_preferredHeight();
            Rect   rect            = this.RectTransform.get_rect();
            double height          = (double)((Rect) ref rect).get_height();

            return(preferredHeight > height);
        }
Ejemplo n.º 2
0
        private bool IsLineCountOver(UnityEngine.UI.Text label, int lineCount)
        {
            StringBuilder stringBuilder = new StringBuilder();

            for (int index = 0; index < lineCount; ++index)
            {
                stringBuilder.Append("\n");
            }
            label.set_text(stringBuilder.ToString());
            double preferredHeight = (double)label.get_preferredHeight();
            Rect   rect            = this.RectTransform.get_rect();
            double height          = (double)((Rect) ref rect).get_height();

            return(preferredHeight > height);
        }