This version of Unity is unsupported.

SortingLayer.layers

public static SortingLayer[] layers;

Description

Returns all the layers defined in this project.

See Also: Tags and Layers.