/// <summary>Gets a 3D representation of this text.</summary> public Text3D Get3D(float scale, Color colour, ref float left, ref float top) { // Create the 3D text object: Text3D text = new Text3D(); int tris; int verts; GetExtrudeCounts(out verts, out tris, scale); // Create the sets: text.Vertices = new Vector3[verts]; text.Triangles = new int[tris * 3]; text.UVs = new Vector2[verts]; text.Colours = new Color[verts]; text.Normals = new Vector3[verts]; for (int i = 0; i < verts; i++) { text.Colours[i] = colour; } // Get the tris/ verts now: GetExtrude(text, 0, 0, verts, tris, scale, ref left, ref top); text.CreateGameObject(); return(text); }
/// <summary>Gets a 3D representation of this text.</summary> public Text3D Get3D(float scale,Color colour,ref float left,ref float top){ // Create the 3D text object: Text3D text=new Text3D(); int tris; int verts; GetExtrudeCounts(out verts,out tris,scale); // Create the sets: text.Vertices=new Vector3[verts]; text.Triangles=new int[tris * 3]; text.UVs=new Vector2[verts]; text.Colours=new Color[verts]; text.Normals=new Vector3[verts]; for(int i=0;i<verts;i++){ text.Colours[i]=colour; } // Get the tris/ verts now: GetExtrude(text,0,0,verts,tris,scale,ref left,ref top); text.CreateGameObject(); return text; }