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.SetLayerWeight

Switch to Manual
public void SetLayerWeight(int layerIndex, float weight);

Parameters

layerIndexThe layer index.
weightThe new layer weight.

Description

Sets the weight of the layer at the given index.