问题
I have two different canvases: one for the background and one for the game scene
Principal canvas:
Background canvas:
I'm having this problem: If I put an object in the principal canvas, everything seems to works but If I add a light component to this object, I'll not see the light (it is like the background image is ahead the light):
Without the background canvas:
With the background canvas:
Any idea why?
(The problem is not the BGcanvas, the problem is the image component of the BGcanvas, if I disable it, I can see the light)
回答1:
Lights are 3D scene objects
UI objects are not effected by lights or scene objects because they exist in a completely different rendering path:
来源:https://stackoverflow.com/questions/52016176/the-light-component-is-behind-image-in-unity