Search Unity

Question TextMesh Pro not being rendered if not viewed at least once from Scene View. What am I missing?

Discussion in 'General Graphics' started by Kolyasisan, Dec 14, 2020.

  1. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    I've made a set of abstractions over Unity's SRP in the form of "RenderTasks" that abstract all the work with CommandBuffers and ScriptableRenderContext. So far so good. However, there is a problem with TextMesh Pro now and I can't deduct the reason for why it broke down.

    The gist of it is that camera-space UGUI TextMesh Pro will not render at all, there aren't even drawcalls for them in frame debugger or Render Doc. That is, until you switch to the Scene View and go back, now suddely they work and are being rendered. And they continue to be working for the entire session, even after domain reloads. In build, such text meshes are always invisible.

    Does this sound perhaps familiar? I can't pinpoint the exact issue. Sometimes I even doubt that it's a bug on my side. Thank you for your attention.
     
  2. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Update: inspecting the mesh object in the editor (property Mesh, just double-clicking on it from the Debug inspector) makes it work.