- Home /
Text within a gameObject boundries.
I am working in a little project and I want to show text within a rectangle. for that I use a sprite(rectangle) and a child that contains a TextMesh as component.
The text change during runtime, and what I want is to make the text always centered and within defined bounderies.
All I can think about is to set the fontSize/Character Size depending on the text length.
But then I wonder is there a better way or a build in functionality.
Thanks before hand.
You can use GUISTYLE for that customizes , You can find many option to do that to center left right etc. See this link.
Your answer
Follow this Question
Related Questions
Make TextMeshPro text appear over sprite? 1 Answer
Text Mesh Pro not following lighting 0 Answers
Unity crashes at writing TextMesh? 0 Answers
Adjust text file reading/detection 0 Answers
TextMeshPro 0 Answers