- Home /
prefab rendering on top of its parent?
Hi I'm instantiating a prefab under a gameobject which under its parent the canvas I've set the layer of the canvas and its childeren to GUI layer and I also assigned a different layer to the prefab
however on runtime the prefab is still getting rendered even that I didn't assign the culling mask of the camera to its layer Note: this prefab is a draggable object and it goes under the second panel when I the method onDrag() is getting called since there is a different in the hierarchy between the two panels if anyone could help I appreciate it I'm stuck with this issue without a solution since couple days
The canvas renders it's contents based on the hierarchy order. Using sibling index after instantiation let's you change that in code. $$anonymous$$ove it in the hierarchy during play mode to see the change in render order.
Thank you for your reply I think it might be a solution. can please put a link of reference for your suggestion or a block of code as example?
Your answer
Follow this Question
Related Questions
Unity - Render XR game objects onto processed camera image 0 Answers
Make Prefab Look At Target 2 Answers
What happened to my camera? 0 Answers
Setting a variable : camera by using findObjectWithTag 1 Answer