- Home /
Question by
O.Macchiato · Apr 04, 2016 at 05:56 PM ·
spriteimagerenderorder
GameObject is rendered behind despite having lower z value in 2D space
Game Object A
z value = -30
Has [Image] Component
Has [Canvas Renderer] Component
Game Object B
z value = -1
Has [Sprite Renderer] Component
Has [Canvas Renderer] Component
Game Object B is rendered on top of Game Object A.
My Question: Why?
Additional Info:
When Game Object A is set to have z value = -32, it gets rendered on top.
To top it off, every other Game Objects with [Image] Component are also rendered on top despite their z values.
Comment
In case anybody is wondering, the camera is on the negative z value side i.e. from the side view, Game Object A is nearer to the camera than Game Object B.
Your answer
![](https://koobas.hobune.stream/wayback/20220612074148im_/https://answers.unity.com/themes/thub/images/avi.jpg)