i have gui on the bottom of my project which is using screen space overlay, and on this gui there are elements that i can click and drag to my map. but when i start to drag the element appears under the gui (which is what i expected) so i tried to position it on a different layer so it would be on top although it does not work, i also tried to create another camera and position it on top of the camera rendering the gui but since it is screen space overlay it makes it impossible. any suggestions ??
This is impossible to do in Screen Space - Overlay. As the name implies overlay goes on top of everything. It is rendered after the rest of the scene has been rendered. While this makes it cheaper to render, it also means you can’t put anything in front of it.
The Fix is to use Screen Space - Camera. You can then adjust the plane distance to allow GameObjects to be in front or behind it. Depending on the distance from the camera.