Documentation

Unity Engine

Unity Engine

GetLayerValueFromName(string)

Returns the final sorting layer value. Additional Resources: SortingLayer.GetLayerValueFromID.
Read time 1 minuteLast updated 2 months ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static int GetLayerValueFromName(string name)

Parameters

name

The unique value of the sorting layer as returned by any renderer's sortingLayerID property.

Returns

Type

Description

intThe final sorting value of the layer relative to other layers.