Search Unity

TextMesh Pro TextMesh Pro: Assign a name for its meshes

Discussion in 'UGUI & TextMesh Pro' started by Peter77, Apr 4, 2019.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Looking at a memory snapshot in the Unity Profiler, it shows various meshes without a name. These seem to be coming from TextMesh Pro.

    Could you please assign any TextMesh Pro run-time generated mesh a name. This would make it easier to see where such mesh comes from, without having to inspect them in detail.

    The name should only be assigned in a development build, to keep memory usage low(er) in master/release builds.

    screenshot.png
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Done... the normal <TextMeshPro> mesh will be called "TextMeshPro Mesh" and the <TextMeshProUGUI> will be called "TextMeshPro UI Mesh".

    This is implemented in Awake and enclosed in #if DEVELOPMENT_BUILD || UNITY_EDITOR
     
    Peter77 likes this.
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Perfect, thank you very much for the rapid help!