The light component is behind Image in Unity

∥☆過路亽.° 提交于 2019-12-24 23:15:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!