Home > Software design >  Text becomes invisible behind background canvas Unity
Text becomes invisible behind background canvas Unity

Time:04-10

I just added 3D Text on my scene and it is invisible on the background of Canvas, that is "Render Mode: Screen Space - Camera". How i can make it visible on background of my canvas?

Text is invisible

CodePudding user response:

There are 2 ways to fix this:

Change the Sorting Layer of the obstructing object to be one behind that of the text, or change the Order in layer of the obstructing object to be lower than that of the canvas.

OR

Create a new canvas with a higher Sorting Layer (you may need to create a new one) or Order in Canvas and place the text in the new canvas.

As an example, here I have my normal text in a lower canvas, but I created an overlay canvas for text that absolutely must go everything else.

enter image description here

I find that the second solution is a better general solution for the issue, as in the first solution you have to change the layers for every object in the scene that might obstruct your text.

  • Related