2D Toolkit Forum

2D Toolkit => Support => Topic started by: kag359six on July 13, 2013, 09:25:35 pm

Title: Text Mesh jumps down slightly when text added in script
Post by: kag359six on July 13, 2013, 09:25:35 pm
I'm trying to change the text property of a text mesh in my scene. I used "scoreMesh.text = score.ToString()" to modify it. When the text changes the mesh jumps down several pixels from its original y position. Any ideas? This didn't happen a few days ago when playing around with text meshes.
Title: Re: Text Mesh jumps down slightly when text added in script
Post by: midasmax on July 13, 2013, 09:37:29 pm
Does it happen for strings of all lengths?
Title: Re: Text Mesh jumps down slightly when text added in script
Post by: unikronsoftware on July 13, 2013, 09:47:07 pm
That should not happen. If you can reproduce it, send me a repro case to support at unikronsoftware.com and I'll investigate.
Title: Re: Text Mesh jumps down slightly when text added in script
Post by: kag359six on July 15, 2013, 01:19:29 am
I figured it out...  :P  There were invisible line spaces in the text field of the TextMesh.
Title: Re: Text Mesh jumps down slightly when text added in script
Post by: unikronsoftware on July 15, 2013, 11:37:33 am
Glad its sorted ;)