Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

TextMesh Pro Modifying glow power on a material preset

Discussion in 'Unity UI & TextMesh Pro' started by dodderz, Sep 9, 2018.

  1. dodderz


    Apr 20, 2015
    I have a TextMeshProUGUI and within the text one word is being set to use a different material preset using the <font="" material=""> tag. The replacement material preset has glow enabled. This works fine but I then want to modify the glow power of that material. I tried doing this by modifying the glow power on the material of the sub mesh that gets created for that text but this doesn't seem to do anything (I imagine the value is getting overwritten by textmesh pro itself each frame?)

    What's the correct way to do this? I want to increase the glow over time. Note that the <font> tag is being inserted at runtime if that makes any difference
  2. Stephan_B


    Unity Technologies

    Feb 26, 2017
    When accessing materials, you have to be mindful that accessing the material directly will result in an instance of a material being created (this is a long established Unity convention) whereas accessing the shared material will affect the material that might be shared by several objects.

    So in this case, it is possible that you end up modifying an instance instead of the shared material.