private static UIText CreateUIText() { GameObject child = CreateUIRectTransform(160, 55); if (child == null) { return(null); } UIText text = child.AddComponent <UIText>(); child.name = text.GetType().Name; child.layer = 0; text.fontSize = 24; text.color = Color.black; text.text = "fasd fsadfdf dfdfsd"; return(text); }