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 Answer 1

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\$
6
  • \$\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\$ Commented Sep 13, 2019 at 12:12
  • \$\begingroup\$ Yeah, that solved it, the material of the text was a wrong one. Thank you! \$\endgroup\$ Commented Sep 13, 2019 at 12:15
  • \$\begingroup\$ No problem. I am glad i was helpful. \$\endgroup\$ Commented Sep 13, 2019 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\$ Commented Sep 13, 2019 at 16:37
  • \$\begingroup\$ Sure, as I said in a previous comment, the text color changed to black when I switched the render mode to screen space overlay. It turned out that I had used the standard material with emission (and fading rendering) I use por the lásers for the GUI texts. As soon as I realized and switched to the default material the problem was fixed. \$\endgroup\$ Commented Sep 14, 2019 at 17:15

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.