Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetLayerValueFromName(string)

Returns the final sorting layer value. Additional Resources: SortingLayer.GetLayerValueFromID.
Read time 1 minuteLast updated 4 days 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.