Hello guys,
I have a problem with the UI Sorting layer in the new uGUI in Unity 4.6 (using the newest beta version 21) and hope you can give me some hints…
I want to do something similar like a pop-up (or layerd buttons), two buttons over each other, one only visible at a time.
For example, I have a button “Stage 1”, that is visible. When I press it, it fades out, and another button (“Stage 2”) fades in and is visible to interact with. (With making invisible I just mean, changing the opacity / alpha value and the sorting layer.
The problem is, one button will always be on top and interactable, no matter what sorting layer or sorting order I gave him. (I am using 2 different canvases to differ between the two stages. These canvases are set to render mode “Screen Space - Camera” and I have two Sorting Layers “Background” and “Foreground”. I also tried, using the Default layer and just adjusting the “Order in Layer”.)
For demonstrating my problem, I add two attachements: An archive, containing a demo-project, and a screenshot.
In the screenshot you can see both buttons visible, one on the left, the other on the right side, that are overlapping. The mousecursor (that cannot be seen in the screenshot) is in the middle of both. The right button, that should be in the background, receives the mouse-over event and gets highlighted (default-button settings). The left button, stays in background, although it has the foreground layer.
I hope you can help me, thanks in advance,
Clemens
1824951–116917–LayerTestProject.zip (209 KB)