0
\$\begingroup\$

I am doing a space game and I have a little problem when doing the GUI.

As you can see here: image the objects from the scene overlap the text from the GUI.

From what I've seen on other topics, it seems that using Camera screen space any object closer than the Plane distance overlaps, but if I decrease the plane distance I can't see the canvas.

I've also tried setting the screen space to overlay, which should fix this, but then the GUI is not shown in the screen.

Anybody knows how to prevent the overlapping or at least what should I do for being able to use screen space overlay? Thanks!

\$\endgroup\$
1
\$\begingroup\$

I think when you change render mode to screen space overlay then target display is not set to Display 1. So do the following I hope this will resolved the issue.

  1. Change Canvas render mode to "screen space to overlay".
  2. Change Target Display to "Display 1".
  3. Make sure one or more UI object in the Canvas is enabled. i.e a button or txt.

enter image description here"

\$\endgroup\$
  • \$\begingroup\$ Hi, yes that's what I tried to do. It turns out that it was working but the text color changed to black and I wasn't able to see it. \$\endgroup\$ – Hector Sep 13 at 12:12
  • \$\begingroup\$ I am glad that you resolved the problem . If my answer have helped then accept and up vote it. \$\endgroup\$ – Swati Sep 13 at 12:14
  • \$\begingroup\$ Yeah, that solved it, the material of the text was a wrong one. Thank you! \$\endgroup\$ – Hector Sep 13 at 12:15
  • \$\begingroup\$ No problem. I am glad i was helpful. \$\endgroup\$ – Swati Sep 13 at 12:20
  • \$\begingroup\$ @Hector you may want to add your own answer showing how you determined the material was wrong and how you fixed it. This could be helpful to other users troubleshooting a similar problem. \$\endgroup\$ – DMGregory Sep 13 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.