Author Topic: Detect if Text Has Overflowed from a TextMesh Pro Object & Write a 2nd Page?  (Read 1191 times)


  • Full Member
  • ***
  • Posts: 210
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
Basically, I need to dynamically generator some dialogue strings, and if it ends up being over four lines, I need to trim off the remainder and put it on a second, third, fourth, or fifth dialogue page. (and save them all so they can be flipped through like pages.)

I'm using a word-wrapped TextMeshPro game object, and we don't want dialogue text falling out the side of the box.

Can we get an action to test if it's being cut off, or to test the number of lines in the string.

There is a super janky way to do this by estimating the max characters in four lines, and trimming everything after, but that doesn't guarantee the pages of text won't be too long or short. We need to check the string on an individual basis.


  • Hero Member
  • *****
  • Posts: 663
    • View Profile
Hi. So I am the creator of the textmesh pro actions. Currently this cannot be handled those actions directly as far as I know. Ie, there is no method in textmesh pro to handle that I think.

Basically what you are asking for would likely require a script of its own, or a series of custom actions + playmaker actions. This may or may not be better handled by one of the dialogue manager assets in the store.