Good day, community. I have 3 layers: first is topmost and third is lowermost. I need that my first layer was on the second, but under the third layer, and the second still being on the third. So I have a question: How to do that, does anyone know?
Please be more specific and define a few things for us so we can help. What does top most mean, order in the layer list or render order? What does lower most mean,order in the layer list or render order? What does 'was on' mean in the statement "first layer was on the second"? What does 'being on' mean in the statement "the second still being on the third"? Also, are we talking about regular layers or sorting layers? It also may be good to give some context as to what you are trying to do.
Assuming you are working with 2D Sprite Renderers. They have an 'Order in Layer' property. You can simply enter a value there. Where 0 is like the default, negative will be behind 0, and positive values will be above 0 and their lesser values. HOWEVER, if you are looking to have a lot more going on, and depending what the layers are. It would probably be best to set up Sorting Layers which can be found directly above the Order in Layer property. This works the same way assigning Tags does. Click the drop down, create a new Sorting Layer, then name it respectively. IE, Background, Foreground, Level etc. Then simply mark certain elements as such! You can use Sorting Layers along side of Order in Layer for best results! But you can mix and match! Really depends on the size of the project and how organized you want to be. Hope this helped!
We are talking about sorting layers. Ok then, here is a picture. I have some solutions that go in photo editors: just make that first layer was invisible on the third or make that first layer rendrer only on the second, but these solutions don't go in Unity as I know.
You can try to add more cameras in scene. Then adjust visiblity layers, camera depths and clear flags.
That's interesting. Can you describe this solution in detail,please? Maybe you have an example? Or can you give some links?
I thought you can make 2 or more cameras. And then just enable layers for rendering. I am not sure now, that this way will help you. Cameras with different depth will still work as other layer. And you are trying to split one layer.
You can set clear flags - don't clear. Then the top camera will render choosen layers (culling mask) and the background will be taken from cameras with lower depth. As said, I dont think it will help you, because you are trying to make 1st layer be in two layers at one time. Try to ask in shader forum about depth mask, maybe