Sorting Layers vs Layers

· 1 min read
Sorting Layers vs Layers

Sorting layer and layer are two concepts which are frequently seen in the Unity.


Sorting layer only affect the visible layers in the game.

Layer affect the contacts and collision.

Sorting Layers

Sorting layers can be added through inspector, select the layers from top tool:

Then click Edit Layers:

for sorting layers, the layer is more on the top, if the value is more bottom in the list.


For Layers, they are related with contact and collision. The sorting of the layers doesn't matter how the objects are seen by the camera. And you can setup which layers can be collided and which are not in the project setting:


Sorting layer only affects how the camera see the game objects.

Layer affect the contacts and collision.