Пример #1
0
        public static GameObject CreateText(DefaultControls.Resources resources, int fontSize)
        {
            GameObject go = UGUITools.CreateUIElementRoot("Text", UGUITools.s_ThickElementSize);

            Text lbl = go.AddComponent <Text>();

            lbl.text            = "New Text";
            lbl.fontSize        = fontSize;
            lbl.raycastTarget   = false;
            lbl.supportRichText = false;
            UGUITools.SetDefaultTextValues(lbl);

            return(go);
        }