Skip to content

Text Rendering

Ryan Schmidt edited this page Jul 31, 2017 · 1 revision

To use TextMeshPro Text (strongly recommended as built-in Unity text is not nearly as good):

  1. Install from Asset Store (free)
  2. Define F3_ENABLE_TEXT_MESH_PRO
  3. done!

Z-Sorting Problems

All HUD UI elements and Text are drawn with transparency, which means they are all in the Transparent RenderQueue. They get depth-sorted against eachother based on their center-points.

In VR this means that text at angles will disappear behind background panels. This is annoying. So, you can optionally stick Text in a separate RenderQueue by calling SceneGraphConfig.ConfigureForVR(), or setting SceneGraphConfig.TextRenderQueue to a value larger than 3000 (that is the Transparent render queue). However, if you do this, All Text will be drawn on top of everything else in the scene (except the cursor). There is no way to avoid this, that I can see...

Clone this wiki locally