How do you auto-size text on a textmesh.
I have dice, with six sides, that I want to put words on. The words will constantly be changing, so I need them to auto size based on the size of the cube, which doesn't change.
The dice are not UI elements and thus sit outside the canvas.
Here is how I am adding the text.
LocationSide1.GetComponent<TextMesh>().text = "1"; LocationSide2.GetComponent<TextMesh>().text = "2"; LocationSide3.GetComponent<TextMesh>().text = "3"; LocationSide4.GetComponent<TextMesh>().text = "4"; LocationSide5.GetComponent<TextMesh>().text = "5"; LocationSide6.GetComponent<TextMesh>().text = "6"; Imagine I want the dice to say "pickle" instead of the 6. The next role it might say "cantaloupe" then "pea". The text will change sizes.
Example how the text sticks over the edge.
