Text not being updated when using SetCharArray

I already posted a similar question in the text mesh thread, but I figured it might be better to open a thread here.

There seems to be a small bug in TMP_Text.SetCharArray(char[ ]). Setting the text using that method doesn’t seem to update the component. Quick glance into the assembly reveals that this method is not calling SetVerticesDirty and SetLayoutDirty like all of it’s brethren do, and calling those two methods manually after setting the array will indeed update the component correctly.

I would also like to ask if it would be possible to add a method with the signature SetCharArray(char[ ], int start, int length). This would be very helpful when working with custom char buffers (which in turn help avoid the garbage inherhent to using strings or StringBuilders). There already exists SetCharArray(int[ ], int start, int length), but it only accepts int arrays, and to my knowledge it’s not possible to cast char arrays to int arrays without allocating a new array. Should only be a minor variation of the existing methods, so that would be great.

Using version 1.0.55.2017.1.0b11 and Unity 2017.1.0f3

Thanks

Let me take a look at the update issue as well as the addition of an overload for SetCharArray()

Update
I fixed the issue you reported as well as added the new overload to SetCharArray(char[ ] array, int start, int length);

These changes will be in the next release.