Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
About TextMesh
« previous
next »
Print
Pages: [
1
]
Author
Topic: About TextMesh (Read 3913 times)
flowzaz
Newbie
Posts: 4
About TextMesh
«
on:
January 10, 2014, 07:07:55 am »
how to make the background picture's size fit with the input word ?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: About TextMesh
«
Reply #1 on:
January 10, 2014, 11:13:42 am »
Get the size of the text mesh using textMesh.GetEstimatedMeshBoundsForString
Once you get the bounds, you can rescale the sprite / sliced sprite to match the bounds. Eg. by getting the bounds, then setting scale to the ratio between the two.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
About TextMesh