I find how to get a size. is by calling mesh.renderer.bounds.size;
this is the code. the characters are not a the good position: I'm using a tk2dCamera
I don't know why but when id devide the bounds.size / 10 it's seem working a little. But i have not the good x position.
Can anyone help me::
private void DoText()
{
float position = 0;
foreach (var c in "New TextMesh")
{
var go = (UnityEngine.GameObject)UnityEngine.GameObject.Instantiate(UnityEngine.Resources.Load("Prefabs/TextMesh"));
var mesh = go.GetComponent<tk2dTextMesh>();
mesh.text = c.ToString();
var bounds = mesh.renderer.bounds;
go.transform.position = new Vector3(position, go.transform.position.y, go.transform.position.z);
position += bounds.size.x / 10 ;
}
}