Since I am a beginner, I was given a test task, there is a game in which some objects are generated outside the canvas - a, but are displayed in the game and at the same time they are located above the camera along the hierarchies, below the picture. But the background added by me is not displayed. Tell me the opportunity to add a background.
|
1 answer
Add a separate camera to the scene, which will draw only the background. But at the same time, if you still have cameras on stage, set them up so that they redraw your background, namely, look towards the Culling Mask and Background settings
And also customize your Canvas so that it is drawn in either Screen Space - Camera or World Space mode.
- I do not know how correct it is, but I used 2
canvas- a, that you can comment on it, do you stand? and is it right? - Abs3akt - 2@IDontLikeBugs on the idea that 2 nanvass that 2 cameras - about the same performance. The solution with 2 cameras is quite standard for this situation, because it does not require any manipulations (the order of drawing other elements and their number will not affect the drawing of the back-up). 2 canvas IMHO is also normal, it is easier and more convenient than doing everything in one, and then writing scripts so that everything will fall into place after adding new elements. The use of several canvases is a normal practice, for example, when the UI is “embedded” in the environment of the world - vmchar
|
