I’ve been trying to add hud counters to a game made with 3d objects but all of the elements with TextMeshPro are appearing behind gameobjects. Normal text works fine as well as other elements such as images, but specifically TextMeshPro elements appear behind all objects in the scene. Is there a fix for this?
1 Answer
1The GameObject the TextMeshPro component is on is probably in the incorrect place in the hierarchy.
If that doesn’t help:
Maybe you are using the incorrect TextMeshPro component?
Maybe it is displaying with an incorrect material?
Maybe the character atlas is not correct?
Maybe the sorting order or sorting layer is incorrect?
Maybe you should reimport TextMeshPro?
I believe this doesn’t apply to this case, but some extra information:
Renderers on GameObjects can appear invisible for multiple reasons. Here are some that come to mind:
-
The Renderer is not enabled
-
The GameObject is on a layer that is not visible to the relevant camera
-
The GameObject’s tag is “EditorOnly” and you are in a build
-
The GameObject is not active in the hierarchy
-
The Renderer is fully transparent
-
The Renderer is a CanvasRenderer and the Canvas is disabled
-
The Renderer is being drawn behind another Renderer
-
The Renderer is being drawn off-screen
-
The Renderer is masked
-
The Renderer’s shader is not fully supported on the device
-
The Renderer is a SpriteRenderer and is not displaying a sprite
-
The relevant camera has a lower priority than another camera, which has a viewport rectangle that fully covers the relevant camera
-
The relevant camera is disabled
-
The relevant camera is on a GameObject that is not active in the hierarchy
