Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMesh Pro Batch increase for Text Mesh Pro(UI) when sprites are used

Discussion in 'UGUI & TextMesh Pro' started by AFTbg, Jun 3, 2019.

  1. AFTbg

    AFTbg

    Joined:
    Dec 14, 2017
    Posts:
    2
    Hey,

    I stumbled upon a performance issue when using Text Mesh Pro and its functionality to add images inside. I am using it for floating text for a clicker game where I need to spawn a lot of texts and I want to have a sprite inside. I have noticed that for each text you have in the scene with an image inside it creates a submesh with 2 materials that add 2 new batches to the scene, which quickly becomes an issue.

    From my understanding this is due to TMPro creating a new material for each text and it doesn't batch them. Is there a way to improve this?

    Note: Dynamic batching is active and I have made the test in editor mode.
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I'll try taking a look at this today.
     
  3. AFTbg

    AFTbg

    Joined:
    Dec 14, 2017
    Posts:
    2
    Any updated on the issue. Should I provide more information and some examples?
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    I need to get a hold of the Graphic Team to figure out why these are not batching as expected.