LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

Animator.GetLayerIndex

Switch to Manual
public int GetLayerIndex(string layerName);

Parameters

layerNameThe layer name.

Returns

int The layer index.

Description

Returns the index of the layer with the given name.