Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetLayerIndex(string)

Returns the index of the layer with the given name.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.AnimationModule
public int GetLayerIndex(string layerName)

Parameters

layerName

The layer name.

Returns

Type

Description

intThe layer index.