- Home /
UI Image causing faded UI text
Morning Crew,
As in the attached image (i have misaligned the text to show the contrast) my semi transparent background png is causing the black text & white text to fade to shades of grey.
All UI elements are inside the same canvas. I have tried changing material of both, changing their order in the hierarchy, changing their relative Z position and the effect remains the same.
How do I keep my text the pure white or black as intended?
Thank you.
[1]: /storage/temp/121002-unity-colors.jpg
@impossiPaul I believe that putting the text as the last item of hierarhcy should force the object to render on top of everything. If that won't work you should try this solution: https://answers.unity.com/questions/1323396/set-different-sorting-layer-for-each-child-of-a-ca.html
Are you using Screen Space - Overlay?
Answer by impossiPaul · Jul 19, 2018 at 11:16 AM
SOLVED! (is there a solved button?)
The UI text needed to go on a new canvas with the "order in Layer" set to a higher number than the other canvas.
Thank you for the tips, they led me to my solution!
Answer by MJRobUnity · Jul 18, 2018 at 09:03 AM
It looks less like the text is the issue and more that the text is behind the image. If the text is below the images in the hierarchy? Or is the camera set to Perspective? if it is then it may be the text is further back in the Z plane than the background. The issue does definitely look like an ordering issue.
Answer by impossiPaul · Jul 18, 2018 at 11:04 AM
Thank you MJ, the UI text is faded even if i move the text a meter or more in front (or behind) of the background UI image! As stated originally, the hierarchy order and z position have no effect on the fadedness.
The cam is set to perspective, but it's VR so that can't change and surely that won't effect this issue? Also i changed to Orth as a test but the faded text remains the same. The alphas of both the text and bg image are 100%.
Your answer
Follow this Question
Related Questions
Unity UI constant physical size one image 0 Answers
Turn Another UI image on and off with a Single UI Button 1 Answer
Is there a way to use the prefab image unity shows? 0 Answers
Image renderer stretching sliced images 1 Answer
Scrolling one UI image causes every other UI image to start scrolling 1 Answer