How to make mesh render objects overlay UI?
Good day. I need that objects of mesh render (puzzles) overlay UI when user pick them. I saw similar topic on this forum and made(I think so) all as was recommended in those answer: set render mode as Screen Space Camera and include my puzzle pieces in UI hierarchy.
It didn't help. I still have this:
I also tried to move panel, whose children are puzzle pieces, by Z axis:
var leftpanel = GameObject.Find("ExampleScenesUICanvas/PuzlePanel/PanelWithPieces/LeftPanel").gameObject;
leftpanel.GetComponent<RectTransform>().localPosition = new Vector3(leftpanel.GetComponent<RectTransform>().localPosition.x, leftpanel.GetComponent<RectTransform>().localPosition.y, -100.0f);
Doesn't help. If I try to move pieces themselfs they just dissapear into somewhere in unity's universe. Is there any way to manage overlaying without localpostion or position or change Z axis by hands?
снимок-экрана-90.png
(101.1 kB)
jm32q.png
(9.1 kB)
Comment
Best Answer
Answer by Langre · Aug 15, 2016 at 07:08 PM
I solved this problem by using layers like in this topic recomended: