Ejemplo n.º 1
0
            public static Text CreateText( GameObject parent, Color textColor = default(Color), string textContent = "", string goName = "" )
            {
                var text = parent.AddChildWithComponent<Text>();
                text.font = Resources.GetBuiltinResource<Font>( "Arial.ttf" );
                text.text = textContent;
                text.name = goName == "" ? textContent : goName;
                text.color = textColor;

                return text;
            }