- Home /
Sorting order layer between instantiated prefabs and UI image
I have this instantiated prefabs and an image under UI image. And I want instantiated prefabs to be top over the UI image. so I tried the instantiated prefabs sorting layer to be layer 3 and layer 2 on ui image but still doesn't work. What should i do?
Answer by JedBeryll · Oct 03, 2016 at 05:19 AM
Unity renders UI from top to bottom, and parent to child in the hierarchy, so if you want something to be rendered last (absolutely), you need to make it the last child of the lowest UI gameObject. Basically you see what covers up your image, so put your new image after that in the hierarchy.
I created an empty gameobject and named it spawner, this is where my objects spawned. Then i tried placing gameobject spawner in UI canvass at the bottom but still no avail.
Your answer
