Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question how do i set character limit for text mesh pro?

Discussion in 'UGUI & TextMesh Pro' started by CodeWithJohnny, Sep 23, 2022.

  1. CodeWithJohnny


    May 25, 2022
    I have a textMesh Pro that i would like to set the amount of character, it from 1 to 9999, but i press play and i use a button to manipulate my textmeshpro, and i can write characters in the scenn till infinite...i just need to validate only a maxlengt of 4
  2. DevDunk


    Feb 13, 2020
    You can use onValueChanged on the input field. If you have more characters than the allowed count simply remove the last bit