I have 2d sprites on my screen that keep appearing behind the Canvas (which I intend to be the background). I made sure to put everything in its proper sorting layer and I even tried adjusting the Z position to very high and very low numbers and they are still appearing behind the Canvas image.
I think this is a Camera issue at this point, but looking at the Main Camera’s components and properties I don’t even know where to begin. Any thoughts?
If you’re using a canvas, you’re making sure that you’re using a screen space canvas and not an overlay one, right?
I adjusted this setting once as well. Some web page mentioned to set it as “world space” because it was to sit in the background.
I just tried switching it to “screen space” though and nothing changed.
I also changed it to “overlay” for laughs, and it totally disappeared until I switched it back.
Something that I thought I’d add because I don’t know how this affects things. but I drag and dropped the image I wanted to use into Unity with the canvas selected when I originally created it. I’d like to verify that the image is ~part~ of the canvas. I cannot see anything indicating that they’re for sure connected other than that the image shows up indented underneath the canvas component in the Hierarchy.
I figured out the problem, and it makes no sense to me to be the solution so if you understand why this fixed it please explain it to me.
I change the Transform’s Scale’s Z field to “0” instead of 150. I had it at 150 because the sprite was showing up really tiny.
I thought the Z field in this case would only enlarge the sprite in the Z field (which actually doesn’t make sense because sprites are supposed to be 2d only, unless this field tells the camera how to render the sprite when viewing the Z plane). Does this have something to do with the camera’s “clipping planes”?