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

TextMesh Pro Changing outlineWidth on a single tmpro on runtime also changes other labels

Discussion in 'UGUI & TextMesh Pro' started by jGate99, Sep 21, 2023.

  1. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,853
    Hi there,

    When i change outlineWidth on runtime for one label, other labels also gets changed.
    How to avoid this behaviour?

    Please advise
    Thanks
     
  2. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    535
    Most the TMP styling options are part of material not the TMP Text component. If you need different settings you need to create separate material.
     
    jGate99 likes this.
  3. jGate99

    jGate99

    Joined:
    Oct 22, 2013
    Posts:
    1,853
    Really appreciate, I'm actually noob when it comes to material.
    I tried creating like this but output was same,
    textWithOutline.fontMaterial = new Material(otherText.fontMaterial);

    I actually want to create entirely new material on runtime
    Thanks