- Home /
Camera does not render button
So in my scene I have a canvas, two buttons, a background image, an event system and a camera. The thing is that when I play the game, the camera seems to not render the buttons. I've tried messing with the camera settings, the canvas settings and with the button settings but nothing happened. Any help would be appreciated
Answer by Harry_Drew · Jun 05, 2021 at 09:17 PM
Check the Z position of the button. If the position is greater than the camera's Z position it won't render
First of all, thank you for your answer. Second, I have checked the z positions of the objects and they are all at zero. Do you have any other ideas for what may be causing the problem?
Answer by DenisIsDenis · Jun 06, 2021 at 02:45 AM
I am guessing two possible reasons:
1) Check the OrderInLayer parameter in the Canvas settings, the larger it is, the closer to the camera it will be rendered.
2) In the camera, the UI layer can be excluded from rendering.
Thank you for your answer! The thing is that I already fixed my problem, turns out the button rendered very small in the camera. Anyway, the problem is fixed but, as I said, thank you anyway for contributing your answer!
oh also, I rewarded you with all the points I got, that being one. Hope you have a good day! -Teo