Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - markmd76

Pages: [1]
1
Support / Re: Programtically changing button text
« on: August 17, 2013, 09:32:48 am »
Bloody typical that!  I have found the solution.

I needed to add the following:
Code: [Select]
textMesh.maxChars = textMesh.text.Length;
The only thing is that there is a  note saying that it will "free & allocate memory, avoid using at runtime.".  Is there a better way to achieve this?

2
Support / Programtically changing button text
« on: August 17, 2013, 08:59:57 am »
I am changing my button text at runtime using:
Code: [Select]
tk2dTextMesh textMesh = child.GetComponentInChildren<tk2dTextMesh>();
textMesh.text = "My New Text";
textMesh.Commit();

However this text does not seem to fit.  It is as if the "Fit" button needs clicking in the inspector.  How doe I do this at runtime?

Thanks.

Pages: [1]