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. Dismiss Notice

Bug TextMeshPro bad performance when creating material presets

Discussion in 'UGUI & TextMesh Pro' started by Hazneliel, May 31, 2023.

  1. Hazneliel


    Nov 14, 2013
    I have been using TextMeshPro for years in my project without ever needing material presets, however a few days ago I created a material preset for a font I'm using and started to notice massive lag spikes when those canvas were enabled during the game.
    I profiled it and couldn't really tell where the problem was

    Since I couldn't figure it out I decided to search the commit where this was introduced and it turns out to be the one where I created the material preset:
    I created it like this:
    BLACKCAPS-Regular BolderOutline is the new material I added.

    I deleted that material and voila! No more lag spikes!

    I am not even using this material preset on this scene.

    So my questions are:
    • Did I created the material preset wrong?
    • Is this a Unity or TextMeshPro Bug?
    • Am I missing something?
    Thanks for any help with this.

    Attached Files: