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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more..
    Dismiss Notice
  3. Dismiss Notice

Returning TextMeshPro to default font size

Discussion in 'UGUI & TextMesh Pro' started by philly1164, May 3, 2021.

  1. philly1164

    philly1164

    Joined:
    Apr 3, 2020
    Posts:
    7
    Hello! I am new with using TextMeshpro(TMP) so bare with me... All I want to do is return a TMP back to the predefined font size I set it to after making it humongous, without having to hard-code every TMP by its font property. Can someone(you) help me please?

    Thanks much.
     
  2. philly1164

    philly1164

    Joined:
    Apr 3, 2020
    Posts:
    7
    I'm such a ditz, all I had to do was create a FONTSIZE variable of type float, store the original font size then carry on with the rest of my code. I was messing with .text instead of .fontSize. Sorry for this post, although it may help someone in the future.