LineRenderer.sortingOrder
Name | Type |
---|---|
sortingOrder | number |
Description
Renderer's order within a sorting layer.
Extra Detail
You can group GameObjects into layers in their SpriteRenderer component. This is called the SortingLayer. The sorting order decides what priority each GameObject has to the Renderer within each Sorting Layer. The lower the number you give it, the further back the GameObject appears. The higher the number, the closer the GameObject looks to the Camera. This is very effective when creating 2D scroller games, as you may want certain GameObjects on the same layer but certain parts to appear in front of others, for example, layering clouds and making them appear in front of the sky.