GetTextTexture() public method

public GetTextTexture ( string text ) : Texture2D
text string
return UnityEngine.Texture2D
Ejemplo n.º 1
0
 public Texture2D GetTexture(GUIFont font)
 {
     Texture2D texture = null;
     if(this.content.image != null)
     {
         texture = this.content.image as Texture2D;
     }
     else
     {
         texture = font.GetTextTexture(this.content.text, (int)this.bounds.width, (int)this.bounds.height);
     }
     return texture;
 }