This version of Unity is unsupported.

SortingLayer.layers

public static SortingLayer[] layers;

Description

Returns all the layers defined in this project.

Additional resources: Tags and Layers.